{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "df3061b8-eb92-4e82-817d-788d62fecba0",
   "metadata": {},
   "outputs": [],
   "source": [
    "import polars as pl"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "78657f7c-b26f-45d8-9c43-b1f289c8ff6e",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pl.read_csv(\"stock_trades/202207-湘财.xls\", encoding=\"gb18030\", separator=\"\\t\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "65119797-8b37-45b9-af31-e8073d9b2967",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "polars.dataframe.frame.DataFrame"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f1f534ea-40f7-4c0e-b2c1-b809e34bbc0a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3dfe60fc-835c-4131-a607-05e526b0e7a9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(17, 16)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7f86c625-48bc-40dd-9a9e-fc41cb72fc10",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "17"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.height"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "9495e35e-1407-4408-bdf0-e8672e66ec62",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.width"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "6a49bdf7-4686-4f78-9d6a-bb508e256c22",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<bound method DataFrame.is_empty of shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.is_empty"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "bf56ae27-37d0-4a1c-84b4-4653ab5705c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.is_empty()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "1b0d9d7a-9b86-4dda-9c81-525803d4e824",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Schema([('发生日期', Int64),\n",
       "        ('证券代码', String),\n",
       "        ('证券名称', String),\n",
       "        ('买卖标志', String),\n",
       "        ('业务名称', String),\n",
       "        ('成交时间', String),\n",
       "        ('成交数量', String),\n",
       "        ('成交价格', Float64),\n",
       "        ('成交金额', Float64),\n",
       "        ('发生金额', Float64),\n",
       "        ('手续费', String),\n",
       "        ('印花税', String),\n",
       "        ('过户费', String),\n",
       "        ('其他费', String),\n",
       "        ('备注', String),\n",
       "        ('币种', String)])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.schema"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "d2e7c58f-7323-4f14-af26-d7c94ca46cd0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['发生日期',\n",
       " '证券代码',\n",
       " '证券名称',\n",
       " '买卖标志',\n",
       " '业务名称',\n",
       " '成交时间',\n",
       " '成交数量',\n",
       " '成交价格',\n",
       " '成交金额',\n",
       " '发生金额',\n",
       " '手续费',\n",
       " '印花税',\n",
       " '过户费',\n",
       " '其他费',\n",
       " '备注',\n",
       " '币种']"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "49e94264-6ac0-41ee-8383-2ff0d03657a3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df.columns)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "42cc6dbb-1ef1-415b-9a64-0eaf8e1afe2c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "polars.schema.Schema"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df.schema)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "b46d091c-b0df-4176-8b7a-d9c5d2314e03",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "collections.OrderedDict"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df.schema).__base__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "27cbda9c-5484-46ae-b99f-ab5ac8f1d6a7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df.schema).__base__.__base__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "04a6f0c3-9575-45f1-9005-549291bc2a3f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "isinstance(df.schema, list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "a56b7765-ee01-40e8-9b30-d484ad602743",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "isinstance(df.schema, dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "97a3fff3-58b1-4d26-90ce-8281ff31ebd3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "odict_keys(['发生日期', '证券代码', '证券名称', '买卖标志', '业务名称', '成交时间', '成交数量', '成交价格', '成交金额', '发生金额', '手续费', '印花税', '过户费', '其他费', '备注', '币种'])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.schema.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "3e448ebe-fad9-4f6a-8ae6-ba627bcd0ed1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "odict_values([Int64, String, String, String, String, String, String, Float64, Float64, Float64, String, String, String, String, String, String])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.schema.values()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "7fa0c435-f6f3-4e76-ad34-18ca68d62904",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "String"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.schema[\"证券代码\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "2054d200-b37b-4e3c-a032-24b25396390e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Int64,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " Float64,\n",
       " Float64,\n",
       " Float64,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " String,\n",
       " String]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "c96ffa0c-c954-46cb-96d5-96dfaea760e8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.schema.keys() == df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "2ab1b0b5-d2e9-4ec0-9fb2-e1783ea36530",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(df.schema.keys()) == df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "3f4344e8-71ad-410b-bb07-95ca9ef1f3b7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(df.schema.values()) == df.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "00393562-56e4-48e6-b1e8-1bb3eb1fae2a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "bdec4335-8841-4e6e-80e4-351514e5fb2a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (1, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (1, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "bdcb5508-c6ba-4f67-86e3-18b959be2b02",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (1, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (1, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "1a2590a4-7aad-40f9-8e0b-81c2d573cc8d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (1, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (1, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬─────────┬──────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费 ┆ 其他费  ┆ 备注     ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---     ┆ ---      ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str    ┆ str     ┆ str      ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪═════════╪══════════╪════════╡\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38   ┆ =\"0.00\" ┆ 证券卖出 ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆        ┆         ┆          ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴─────────┴──────────┴────────┘"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "627654ea-03dc-418e-b525-df8739a92e83",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (1, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (1, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "ba1aebf1-09d7-4bfc-88ad-6eb2fe16f610",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "0d3916bb-3357-4314-8176-ba1b80249b54",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (2, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (2, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬─────────┬──────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费 ┆ 其他费  ┆ 备注     ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---     ┆ ---      ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str    ┆ str     ┆ str      ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪═════════╪══════════╪════════╡\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51   ┆ =\"0.00\" ┆ 证券买入 ┆ 人民币 │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49   ┆ =\"0.00\" ┆ 证券买入 ┆ 人民币 │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴─────────┴──────────┴────────┘"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[3:5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "dc4fb4dc-3cf3-425e-b1c5-976884125f99",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "520b59be-b54f-4d0b-8a9e-a289b21820f6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 3)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th><th>买卖标志</th><th>业务名称</th></tr><tr><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td></tr><tr><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td></tr><tr><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td></tr><tr><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 3)\n",
       "┌──────────┬──────────┬──────────────┐\n",
       "│ 证券名称 ┆ 买卖标志 ┆ 业务名称     │\n",
       "│ ---      ┆ ---      ┆ ---          │\n",
       "│ str      ┆ str      ┆ str          │\n",
       "╞══════════╪══════════╪══════════════╡\n",
       "│ 赣粤高速 ┆ 卖出     ┆ 股息入账     │\n",
       "│ GC007    ┆ 卖出     ┆ 拆出质押购回 │\n",
       "│ 嘉事堂   ┆ 卖出     ┆ 证券卖出     │\n",
       "│ 安泰集团 ┆ 买入     ┆ 证券买入     │\n",
       "│ 外高桥   ┆ 买入     ┆ 证券买入     │\n",
       "│ …        ┆ …        ┆ …            │\n",
       "│ GC007    ┆ 卖出     ┆ 质押回购拆出 │\n",
       "│ 金隅集团 ┆ 买入     ┆ 证券买入     │\n",
       "│ 广日股份 ┆ 买入     ┆ 证券买入     │\n",
       "│ 渝农商行 ┆ 买入     ┆ 证券买入     │\n",
       "│ GC007    ┆ 卖出     ┆ 拆出质押购回 │\n",
       "└──────────┴──────────┴──────────────┘"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, 2:5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "125c9073-f19b-46da-898b-5fbb6747e240",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th></tr><tr><td>i64</td></tr></thead><tbody><tr><td>20220721</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>&hellip;</td></tr><tr><td>20220711</td></tr><tr><td>20220711</td></tr><tr><td>20220711</td></tr><tr><td>20220711</td></tr><tr><td>20220707</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '发生日期' [i64]\n",
       "[\n",
       "\t20220721\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t…\n",
       "\t20220711\n",
       "\t20220711\n",
       "\t20220711\n",
       "\t20220711\n",
       "\t20220707\n",
       "]"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "80da7d0b-15a8-487a-b3a5-2c53754a963e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>业务名称</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;股息入账&quot;</td></tr><tr><td>&quot;拆出质押购回&quot;</td></tr><tr><td>&quot;证券卖出&quot;</td></tr><tr><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;证券买入&quot;</td></tr><tr><td>&hellip;</td></tr><tr><td>&quot;质押回购拆出&quot;</td></tr><tr><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;拆出质押购回&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '业务名称' [str]\n",
       "[\n",
       "\t\"股息入账\"\n",
       "\t\"拆出质押购回\"\n",
       "\t\"证券卖出\"\n",
       "\t\"证券买入\"\n",
       "\t\"证券买入\"\n",
       "\t…\n",
       "\t\"质押回购拆出\"\n",
       "\t\"证券买入\"\n",
       "\t\"证券买入\"\n",
       "\t\"证券买入\"\n",
       "\t\"拆出质押购回\"\n",
       "]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, 4]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "e6a5e39a-0041-492c-9446-3d953bfbde39",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 5)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 5)\n",
       "┌──────────┬───────────┬──────────┬──────────┬──────────────┐\n",
       "│ 发生日期 ┆ 证券代码  ┆ 证券名称 ┆ 买卖标志 ┆ 业务名称     │\n",
       "│ ---      ┆ ---       ┆ ---      ┆ ---      ┆ ---          │\n",
       "│ i64      ┆ str       ┆ str      ┆ str      ┆ str          │\n",
       "╞══════════╪═══════════╪══════════╪══════════╪══════════════╡\n",
       "│ 20220721 ┆ 600269    ┆ 赣粤高速 ┆ 卖出     ┆ 股息入账     │\n",
       "│ 20220718 ┆ 204007    ┆ GC007    ┆ 卖出     ┆ 拆出质押购回 │\n",
       "│ 20220718 ┆ =\"002462\" ┆ 嘉事堂   ┆ 卖出     ┆ 证券卖出     │\n",
       "│ 20220718 ┆ 600408    ┆ 安泰集团 ┆ 买入     ┆ 证券买入     │\n",
       "│ 20220718 ┆ 600648    ┆ 外高桥   ┆ 买入     ┆ 证券买入     │\n",
       "│ …        ┆ …         ┆ …        ┆ …        ┆ …            │\n",
       "│ 20220711 ┆ 204007    ┆ GC007    ┆ 卖出     ┆ 质押回购拆出 │\n",
       "│ 20220711 ┆ 601992    ┆ 金隅集团 ┆ 买入     ┆ 证券买入     │\n",
       "│ 20220711 ┆ 600894    ┆ 广日股份 ┆ 买入     ┆ 证券买入     │\n",
       "│ 20220711 ┆ 601077    ┆ 渝农商行 ┆ 买入     ┆ 证券买入     │\n",
       "│ 20220707 ┆ 204007    ┆ GC007    ┆ 卖出     ┆ 拆出质押购回 │\n",
       "└──────────┴───────────┴──────────┴──────────┴──────────────┘"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, :5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "0432cf67-eae8-46b1-9ae7-47af35e72543",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>其他费</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&hellip;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '其他费' [str]\n",
       "[\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t…\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "\t\"=\"0.00\"\"\n",
       "]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, -3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "9b85c838-f022-42e3-b3ce-a39b66ade3b0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 3)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 3)\n",
       "┌─────────┬─────────────────────────────────┬────────┐\n",
       "│ 其他费  ┆ 备注                            ┆ 币种   │\n",
       "│ ---     ┆ ---                             ┆ ---    │\n",
       "│ str     ┆ str                             ┆ str    │\n",
       "╞═════════╪═════════════════════════════════╪════════╡\n",
       "│ =\"0.00\" ┆ 股息入账:赣粤高速600269;        ┆ 人民币 │\n",
       "│         ┆ 权益股数:40700;                 ┆        │\n",
       "│ =\"0.00\" ┆ 融券购回:18.63实际占款天数：7-8 ┆ 人民币 │\n",
       "│         ┆ 88880                           ┆        │\n",
       "│ =\"0.00\" ┆ 证券卖出                        ┆ 人民币 │\n",
       "│ =\"0.00\" ┆ 证券买入                        ┆ 人民币 │\n",
       "│ =\"0.00\" ┆ 证券买入                        ┆ 人民币 │\n",
       "│ …       ┆ …                               ┆ …      │\n",
       "│ =\"0.00\" ┆ 融券回购购回日:20220718预计利息 ┆ 人民币 │\n",
       "│         ┆ :18.63参考占款…                 ┆        │\n",
       "│ =\"0.00\" ┆ 证券买入                        ┆ 人民币 │\n",
       "│ =\"0.00\" ┆ 证券买入                        ┆ 人民币 │\n",
       "│ =\"0.00\" ┆ 证券买入                        ┆ 人民币 │\n",
       "│ =\"0.00\" ┆ 融券购回:357.61实际占款天数：7- ┆ 人民币 │\n",
       "│         ┆ 888880                          ┆        │\n",
       "└─────────┴─────────────────────────────────┴────────┘"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, -3:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "56921ae4-eb6e-4b61-8beb-7f65485bff85",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "5e73e0a8-c35d-4060-9c2c-abc1dc38ad78",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;赣粤高速&quot;</td></tr><tr><td>&quot;GC007&quot;</td></tr><tr><td>&quot;嘉事堂&quot;</td></tr><tr><td>&quot;安泰集团&quot;</td></tr><tr><td>&quot;外高桥&quot;</td></tr><tr><td>&hellip;</td></tr><tr><td>&quot;GC007&quot;</td></tr><tr><td>&quot;金隅集团&quot;</td></tr><tr><td>&quot;广日股份&quot;</td></tr><tr><td>&quot;渝农商行&quot;</td></tr><tr><td>&quot;GC007&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '证券名称' [str]\n",
       "[\n",
       "\t\"赣粤高速\"\n",
       "\t\"GC007\"\n",
       "\t\"嘉事堂\"\n",
       "\t\"安泰集团\"\n",
       "\t\"外高桥\"\n",
       "\t…\n",
       "\t\"GC007\"\n",
       "\t\"金隅集团\"\n",
       "\t\"广日股份\"\n",
       "\t\"渝农商行\"\n",
       "\t\"GC007\"\n",
       "]"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, \"证券名称\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "d1df8a47-eb07-4191-9607-e1c2212908e4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th><th>成交金额</th></tr><tr><td>str</td><td>f64</td></tr></thead><tbody><tr><td>&quot;赣粤高速&quot;</td><td>4884.0</td></tr><tr><td>&quot;GC007&quot;</td><td>58000.0</td></tr><tr><td>&quot;嘉事堂&quot;</td><td>137344.0</td></tr><tr><td>&quot;安泰集团&quot;</td><td>149930.0</td></tr><tr><td>&quot;外高桥&quot;</td><td>150019.0</td></tr><tr><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;GC007&quot;</td><td>58000.0</td></tr><tr><td>&quot;金隅集团&quot;</td><td>139860.0</td></tr><tr><td>&quot;广日股份&quot;</td><td>139956.0</td></tr><tr><td>&quot;渝农商行&quot;</td><td>139795.0</td></tr><tr><td>&quot;GC007&quot;</td><td>758000.0</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 2)\n",
       "┌──────────┬──────────┐\n",
       "│ 证券名称 ┆ 成交金额 │\n",
       "│ ---      ┆ ---      │\n",
       "│ str      ┆ f64      │\n",
       "╞══════════╪══════════╡\n",
       "│ 赣粤高速 ┆ 4884.0   │\n",
       "│ GC007    ┆ 58000.0  │\n",
       "│ 嘉事堂   ┆ 137344.0 │\n",
       "│ 安泰集团 ┆ 149930.0 │\n",
       "│ 外高桥   ┆ 150019.0 │\n",
       "│ …        ┆ …        │\n",
       "│ GC007    ┆ 58000.0  │\n",
       "│ 金隅集团 ┆ 139860.0 │\n",
       "│ 广日股份 ┆ 139956.0 │\n",
       "│ 渝农商行 ┆ 139795.0 │\n",
       "│ GC007    ┆ 758000.0 │\n",
       "└──────────┴──────────┘"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, [\"证券名称\", \"成交金额\"]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "d231d878-0147-478e-84f7-f386ce72eeae",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 7)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th></tr><tr><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td></tr><tr><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td></tr><tr><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td></tr><tr><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td></tr><tr><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td></tr><tr><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td></tr><tr><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 7)\n",
       "┌──────────┬──────────┬──────────────┬──────────┬───────────┬──────────┬──────────┐\n",
       "│ 证券名称 ┆ 买卖标志 ┆ 业务名称     ┆ 成交时间 ┆ 成交数量  ┆ 成交价格 ┆ 成交金额 │\n",
       "│ ---      ┆ ---      ┆ ---          ┆ ---      ┆ ---       ┆ ---      ┆ ---      │\n",
       "│ str      ┆ str      ┆ str          ┆ str      ┆ str       ┆ f64      ┆ f64      │\n",
       "╞══════════╪══════════╪══════════════╪══════════╪═══════════╪══════════╪══════════╡\n",
       "│ 赣粤高速 ┆ 卖出     ┆ 股息入账     ┆ 16:00:00 ┆ =\"0.00\"   ┆ 3.6      ┆ 4884.0   │\n",
       "│ GC007    ┆ 卖出     ┆ 拆出质押购回 ┆ 19:03:27 ┆ -580.00   ┆ 1.675    ┆ 58000.0  │\n",
       "│ 嘉事堂   ┆ 卖出     ┆ 证券卖出     ┆ 09:38:10 ┆ -10400.00 ┆ 13.2062  ┆ 137344.0 │\n",
       "│ 安泰集团 ┆ 买入     ┆ 证券买入     ┆ 09:44:52 ┆ 47000.00  ┆ 3.19     ┆ 149930.0 │\n",
       "│ 外高桥   ┆ 买入     ┆ 证券买入     ┆ 09:44:31 ┆ 11900.00  ┆ 12.6066  ┆ 150019.0 │\n",
       "│ …        ┆ …        ┆ …            ┆ …        ┆ …         ┆ …        ┆ …        │\n",
       "│ GC007    ┆ 卖出     ┆ 质押回购拆出 ┆ 09:39:27 ┆ 580.00    ┆ 1.675    ┆ 58000.0  │\n",
       "│ 金隅集团 ┆ 买入     ┆ 证券买入     ┆ 09:37:25 ┆ 54000.00  ┆ 2.59     ┆ 139860.0 │\n",
       "│ 广日股份 ┆ 买入     ┆ 证券买入     ┆ 09:36:30 ┆ 21400.00  ┆ 6.54     ┆ 139956.0 │\n",
       "│ 渝农商行 ┆ 买入     ┆ 证券买入     ┆ 09:34:24 ┆ 38300.00  ┆ 3.65     ┆ 139795.0 │\n",
       "│ GC007    ┆ 卖出     ┆ 拆出质押购回 ┆ 19:17:51 ┆ -7580.00  ┆ 2.46     ┆ 758000.0 │\n",
       "└──────────┴──────────┴──────────────┴──────────┴───────────┴──────────┴──────────┘"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, \"证券名称\":\"成交金额\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "336df41e-ee1b-4d03-a30c-f1b9db32eb8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5, 7)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th></tr><tr><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td></tr><tr><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td></tr><tr><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td></tr><tr><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5, 7)\n",
       "┌──────────┬──────────┬──────────────┬──────────┬───────────┬──────────┬──────────┐\n",
       "│ 证券名称 ┆ 买卖标志 ┆ 业务名称     ┆ 成交时间 ┆ 成交数量  ┆ 成交价格 ┆ 成交金额 │\n",
       "│ ---      ┆ ---      ┆ ---          ┆ ---      ┆ ---       ┆ ---      ┆ ---      │\n",
       "│ str      ┆ str      ┆ str          ┆ str      ┆ str       ┆ f64      ┆ f64      │\n",
       "╞══════════╪══════════╪══════════════╪══════════╪═══════════╪══════════╪══════════╡\n",
       "│ 赣粤高速 ┆ 卖出     ┆ 股息入账     ┆ 16:00:00 ┆ =\"0.00\"   ┆ 3.6      ┆ 4884.0   │\n",
       "│ GC007    ┆ 卖出     ┆ 拆出质押购回 ┆ 19:03:27 ┆ -580.00   ┆ 1.675    ┆ 58000.0  │\n",
       "│ 嘉事堂   ┆ 卖出     ┆ 证券卖出     ┆ 09:38:10 ┆ -10400.00 ┆ 13.2062  ┆ 137344.0 │\n",
       "│ 安泰集团 ┆ 买入     ┆ 证券买入     ┆ 09:44:52 ┆ 47000.00  ┆ 3.19     ┆ 149930.0 │\n",
       "│ 外高桥   ┆ 买入     ┆ 证券买入     ┆ 09:44:31 ┆ 11900.00  ┆ 12.6066  ┆ 150019.0 │\n",
       "└──────────┴──────────┴──────────────┴──────────┴───────────┴──────────┴──────────┘"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:5, \"证券名称\":\"成交金额\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "5cb26e2c-eccc-4872-9fcd-7a0716167d87",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (4, 7)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th></tr><tr><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td></tr><tr><td>&quot;赣粤高速&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:43:38&quot;</td><td>&quot;40700.00&quot;</td><td>3.69</td><td>150183.0</td></tr><tr><td>&quot;金隅集团&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:39:28&quot;</td><td>&quot;-54000.00&quot;</td><td>2.5683</td><td>138686.0</td></tr><tr><td>&quot;广日股份&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:39:06&quot;</td><td>&quot;-21400.00&quot;</td><td>6.5419</td><td>139996.0</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (4, 7)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───────────┬──────────┬──────────┐\n",
       "│ 证券名称 ┆ 买卖标志 ┆ 业务名称 ┆ 成交时间 ┆ 成交数量  ┆ 成交价格 ┆ 成交金额 │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆ ---       ┆ ---      ┆ ---      │\n",
       "│ str      ┆ str      ┆ str      ┆ str      ┆ str       ┆ f64      ┆ f64      │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══════════╪══════════╪══════════╡\n",
       "│ 赣粤高速 ┆ 卖出     ┆ 股息入账 ┆ 16:00:00 ┆ =\"0.00\"   ┆ 3.6      ┆ 4884.0   │\n",
       "│ 赣粤高速 ┆ 买入     ┆ 证券买入 ┆ 09:43:38 ┆ 40700.00  ┆ 3.69     ┆ 150183.0 │\n",
       "│ 金隅集团 ┆ 卖出     ┆ 证券卖出 ┆ 09:39:28 ┆ -54000.00 ┆ 2.5683   ┆ 138686.0 │\n",
       "│ 广日股份 ┆ 卖出     ┆ 证券卖出 ┆ 09:39:06 ┆ -21400.00 ┆ 6.5419   ┆ 139996.0 │\n",
       "└──────────┴──────────┴──────────┴──────────┴───────────┴──────────┴──────────┘"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[[0, 5, 7, 8], \"证券名称\":\"成交金额\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "b71a2b6c-52d9-4e75-8226-9b1605009944",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(20220721,\n",
       " '600269',\n",
       " '赣粤高速',\n",
       " '卖出',\n",
       " '股息入账',\n",
       " '16:00:00',\n",
       " '=\"0.00\"',\n",
       " 3.6,\n",
       " 4884.0,\n",
       " 4884.0,\n",
       " '=\"0.00\"',\n",
       " '=\"0.00\"',\n",
       " '=\"0.00\"',\n",
       " '=\"0.00\"',\n",
       " '股息入账:赣粤高速600269; 权益股数:40700;',\n",
       " '人民币')"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.row(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "1f862fa9-9f2b-4793-955e-ed3123bf7ef7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tuple"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df.row(0))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "15e572ee-9ef1-49d3-ae78-d16b9364cd8d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(20220707,\n",
       " '204007',\n",
       " 'GC007',\n",
       " '卖出',\n",
       " '拆出质押购回',\n",
       " '19:17:51',\n",
       " '-7580.00',\n",
       " 2.46,\n",
       " 758000.0,\n",
       " 758357.61,\n",
       " '=\"0.00\"',\n",
       " '=\"0.00\"',\n",
       " '=\"0.00\"',\n",
       " '=\"0.00\"',\n",
       " '融券购回:357.61实际占款天数：7-888880',\n",
       " '人民币')"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.row(-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "3b945869-d9ba-4cd8-92b0-b28fd49658c7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(20220721,\n",
       "  '600269',\n",
       "  '赣粤高速',\n",
       "  '卖出',\n",
       "  '股息入账',\n",
       "  '16:00:00',\n",
       "  '=\"0.00\"',\n",
       "  3.6,\n",
       "  4884.0,\n",
       "  4884.0,\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '股息入账:赣粤高速600269; 权益股数:40700;',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '204007',\n",
       "  'GC007',\n",
       "  '卖出',\n",
       "  '拆出质押购回',\n",
       "  '19:03:27',\n",
       "  '-580.00',\n",
       "  1.675,\n",
       "  58000.0,\n",
       "  58018.63,\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '融券购回:18.63实际占款天数：7-888880',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '=\"002462\"',\n",
       "  '嘉事堂',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:38:10',\n",
       "  '-10400.00',\n",
       "  13.2062,\n",
       "  137344.0,\n",
       "  137184.67,\n",
       "  '21.98',\n",
       "  '137.35',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600408',\n",
       "  '安泰集团',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:44:52',\n",
       "  '47000.00',\n",
       "  3.19,\n",
       "  149930.0,\n",
       "  -149955.5,\n",
       "  '23.99',\n",
       "  '=\"0.00\"',\n",
       "  '1.51',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600648',\n",
       "  '外高桥',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:44:31',\n",
       "  '11900.00',\n",
       "  12.6066,\n",
       "  150019.0,\n",
       "  -150044.49,\n",
       "  '24.00',\n",
       "  '=\"0.00\"',\n",
       "  '1.49',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600269',\n",
       "  '赣粤高速',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:43:38',\n",
       "  '40700.00',\n",
       "  3.69,\n",
       "  150183.0,\n",
       "  -150208.53,\n",
       "  '24.03',\n",
       "  '=\"0.00\"',\n",
       "  '1.50',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600015',\n",
       "  '华夏银行',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:42:51',\n",
       "  '30000.00',\n",
       "  5.07,\n",
       "  152100.0,\n",
       "  -152125.86,\n",
       "  '24.34',\n",
       "  '=\"0.00\"',\n",
       "  '1.52',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '601992',\n",
       "  '金隅集团',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:39:28',\n",
       "  '-54000.00',\n",
       "  2.5683,\n",
       "  138686.0,\n",
       "  138523.74,\n",
       "  '22.19',\n",
       "  '138.69',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600894',\n",
       "  '广日股份',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:39:06',\n",
       "  '-21400.00',\n",
       "  6.5419,\n",
       "  139996.0,\n",
       "  139832.12,\n",
       "  '22.40',\n",
       "  '140.02',\n",
       "  '1.46',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '601077',\n",
       "  '渝农商行',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:38:30',\n",
       "  '-38300.00',\n",
       "  3.58,\n",
       "  137114.0,\n",
       "  136953.55,\n",
       "  '21.94',\n",
       "  '137.13',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '=\"002462\"',\n",
       "  '嘉事堂',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:38:16',\n",
       "  '10400.00',\n",
       "  13.51,\n",
       "  140504.0,\n",
       "  -140526.48,\n",
       "  '22.48',\n",
       "  '=\"0.00\"',\n",
       "  '1.41',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '=\"000900\"',\n",
       "  '现代投资',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:33:37',\n",
       "  '34400.00',\n",
       "  4.05,\n",
       "  139320.0,\n",
       "  -139342.29,\n",
       "  '22.29',\n",
       "  '=\"0.00\"',\n",
       "  '1.39',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '204007',\n",
       "  'GC007',\n",
       "  '卖出',\n",
       "  '质押回购拆出',\n",
       "  '09:39:27',\n",
       "  '580.00',\n",
       "  1.675,\n",
       "  58000.0,\n",
       "  -58002.9,\n",
       "  '2.90',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '融券回购购回日:20220718预计利息:18.63参考占款天数：7-888880',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '601992',\n",
       "  '金隅集团',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:37:25',\n",
       "  '54000.00',\n",
       "  2.59,\n",
       "  139860.0,\n",
       "  -139883.8,\n",
       "  '22.38',\n",
       "  '=\"0.00\"',\n",
       "  '1.42',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '600894',\n",
       "  '广日股份',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:36:30',\n",
       "  '21400.00',\n",
       "  6.54,\n",
       "  139956.0,\n",
       "  -139979.8,\n",
       "  '22.39',\n",
       "  '=\"0.00\"',\n",
       "  '1.41',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '601077',\n",
       "  '渝农商行',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:34:24',\n",
       "  '38300.00',\n",
       "  3.65,\n",
       "  139795.0,\n",
       "  -139818.75,\n",
       "  '22.37',\n",
       "  '=\"0.00\"',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220707,\n",
       "  '204007',\n",
       "  'GC007',\n",
       "  '卖出',\n",
       "  '拆出质押购回',\n",
       "  '19:17:51',\n",
       "  '-7580.00',\n",
       "  2.46,\n",
       "  758000.0,\n",
       "  758357.61,\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '融券购回:357.61实际占款天数：7-888880',\n",
       "  '人民币')]"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.rows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "7c470ef8-c89c-4880-b29b-0024f271fec2",
   "metadata": {},
   "outputs": [],
   "source": [
    "r = df.rows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "dfb81dbd-a4d9-4893-83e9-146ec8d73bf5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "list"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(r)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "7df4dc14-13af-4240-8900-287ee256317c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tuple"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(r[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "9ab99ab9-0d4b-4910-b171-c0838a0ef168",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "17"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(r)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "c27b8379-63c1-4506-8093-1a14b068972c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(r[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "6b3bb3bf-12ce-4bf5-871d-703c29837f95",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>成交金额</th></tr><tr><td>f64</td></tr></thead><tbody><tr><td>4884.0</td></tr><tr><td>58000.0</td></tr><tr><td>137344.0</td></tr><tr><td>149930.0</td></tr><tr><td>150019.0</td></tr><tr><td>&hellip;</td></tr><tr><td>58000.0</td></tr><tr><td>139860.0</td></tr><tr><td>139956.0</td></tr><tr><td>139795.0</td></tr><tr><td>758000.0</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '成交金额' [f64]\n",
       "[\n",
       "\t4884.0\n",
       "\t58000.0\n",
       "\t137344.0\n",
       "\t149930.0\n",
       "\t150019.0\n",
       "\t…\n",
       "\t58000.0\n",
       "\t139860.0\n",
       "\t139956.0\n",
       "\t139795.0\n",
       "\t758000.0\n",
       "]"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.get_column(\"成交金额\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "3d7c2f08-22ec-4e77-a8b3-bf86adad13b1",
   "metadata": {},
   "outputs": [],
   "source": [
    "s = df.get_column(\"成交金额\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "0f8a3b47-bd57-4a98-9698-46fc62547057",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "polars.series.series.Series"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "e0069990-879b-44b6-bf41-5c147602d2df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>买卖标志</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;卖出&quot;</td></tr><tr><td>&quot;卖出&quot;</td></tr><tr><td>&quot;卖出&quot;</td></tr><tr><td>&quot;买入&quot;</td></tr><tr><td>&quot;买入&quot;</td></tr><tr><td>&hellip;</td></tr><tr><td>&quot;卖出&quot;</td></tr><tr><td>&quot;买入&quot;</td></tr><tr><td>&quot;买入&quot;</td></tr><tr><td>&quot;买入&quot;</td></tr><tr><td>&quot;卖出&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '买卖标志' [str]\n",
       "[\n",
       "\t\"卖出\"\n",
       "\t\"卖出\"\n",
       "\t\"卖出\"\n",
       "\t\"买入\"\n",
       "\t\"买入\"\n",
       "\t…\n",
       "\t\"卖出\"\n",
       "\t\"买入\"\n",
       "\t\"买入\"\n",
       "\t\"买入\"\n",
       "\t\"卖出\"\n",
       "]"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_series(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "63ccd831-fe84-4d6f-855b-ba60d9c5d94c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rows: 17\n",
      "Columns: 16\n",
      "$ 发生日期 <i64> 20220721, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718\n",
      "$ 证券代码 <str> '600269', '204007', '=\"002462\"', '600408', '600648', '600269', '600015', '601992', '600894', '601077'\n",
      "$ 证券名称 <str> '赣粤高速', 'GC007', '嘉事堂', '安泰集团', '外高桥', '赣粤高速', '华夏银行', '金隅集团', '广日股份', '渝农商行'\n",
      "$ 买卖标志 <str> '卖出', '卖出', '卖出', '买入', '买入', '买入', '买入', '卖出', '卖出', '卖出'\n",
      "$ 业务名称 <str> '股息入账', '拆出质押购回', '证券卖出', '证券买入', '证券买入', '证券买入', '证券买入', '证券卖出', '证券卖出', '证券卖出'\n",
      "$ 成交时间 <str> '16:00:00', '19:03:27', '09:38:10', '09:44:52', '09:44:31', '09:43:38', '09:42:51', '09:39:28', '09:39:06', '09:38:30'\n",
      "$ 成交数量 <str> '=\"0.00\"', '-580.00', '-10400.00', '47000.00', '11900.00', '40700.00', '30000.00', '-54000.00', '-21400.00', '-38300.00'\n",
      "$ 成交价格 <f64> 3.6, 1.675, 13.2062, 3.19, 12.6066, 3.69, 5.07, 2.5683, 6.5419, 3.58\n",
      "$ 成交金额 <f64> 4884.0, 58000.0, 137344.0, 149930.0, 150019.0, 150183.0, 152100.0, 138686.0, 139996.0, 137114.0\n",
      "$ 发生金额 <f64> 4884.0, 58018.63, 137184.67, -149955.5, -150044.49, -150208.53, -152125.86, 138523.74, 139832.12, 136953.55\n",
      "$ 手续费  <str> '=\"0.00\"', '=\"0.00\"', '21.98', '23.99', '24.00', '24.03', '24.34', '22.19', '22.40', '21.94'\n",
      "$ 印花税  <str> '=\"0.00\"', '=\"0.00\"', '137.35', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '138.69', '140.02', '137.13'\n",
      "$ 过户费  <str> '=\"0.00\"', '=\"0.00\"', '1.38', '1.51', '1.49', '1.50', '1.52', '1.38', '1.46', '1.38'\n",
      "$ 其他费  <str> '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"'\n",
      "$ 备注   <str> '股息入账:赣粤高速600269; 权益股数:40700;', '融券购回:18.63实际占款天数：7-888880', '证券卖出', '证券买入', '证券买入', '证券买入', '证券买入', '证券卖出', '证券卖出', '证券卖出'\n",
      "$ 币种   <str> '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币'\n",
      "\n"
     ]
    }
   ],
   "source": [
    "df.glimpse()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "bb94567e-c55a-44aa-987a-b7a02ba499f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (3, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (3, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "0c6395e2-6333-40af-8a94-1ee2839419a3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "d7f982f3-a297-438e-9457-dbdecb82e62e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (4, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (4, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tail(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "0a357cfd-1add-4d14-8d27-33842767031d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (1, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (1, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sample()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "25089e96-3460-45b3-88dd-fb164b4a7bba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:39:06&quot;</td><td>&quot;-21400.00&quot;</td><td>6.5419</td><td>139996.0</td><td>139832.12</td><td>&quot;22.40&quot;</td><td>&quot;140.02&quot;</td><td>&quot;1.46&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "│ 20220718 ┆ 600894   ┆ 广日股份 ┆ 卖出     ┆ … ┆ 1.46    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "5a9e1eeb-8c3c-4813-b6f6-e983337d1a36",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5, 5)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th></tr><tr><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td></tr><tr><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td></tr><tr><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td></tr><tr><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td></tr><tr><td>&quot;现代投资&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:33:37&quot;</td><td>&quot;34400.00&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5, 5)\n",
       "┌──────────┬──────────┬──────────────┬──────────┬──────────┐\n",
       "│ 证券名称 ┆ 买卖标志 ┆ 业务名称     ┆ 成交时间 ┆ 成交数量 │\n",
       "│ ---      ┆ ---      ┆ ---          ┆ ---      ┆ ---      │\n",
       "│ str      ┆ str      ┆ str          ┆ str      ┆ str      │\n",
       "╞══════════╪══════════╪══════════════╪══════════╪══════════╡\n",
       "│ 渝农商行 ┆ 买入     ┆ 证券买入     ┆ 09:34:24 ┆ 38300.00 │\n",
       "│ 广日股份 ┆ 买入     ┆ 证券买入     ┆ 09:36:30 ┆ 21400.00 │\n",
       "│ GC007    ┆ 卖出     ┆ 拆出质押购回 ┆ 19:03:27 ┆ -580.00  │\n",
       "│ 外高桥   ┆ 买入     ┆ 证券买入     ┆ 09:44:31 ┆ 11900.00 │\n",
       "│ 现代投资 ┆ 买入     ┆ 证券买入     ┆ 09:33:37 ┆ 34400.00 │\n",
       "└──────────┴──────────┴──────────────┴──────────┴──────────┘"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, \"证券名称\":\"成交数量\"].sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "d6049505-8f89-4256-af6f-89251e50bdad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (9, 17)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>statistic</th><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>str</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;count&quot;</td><td>17.0</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>17.0</td><td>17.0</td><td>17.0</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td><td>&quot;17&quot;</td></tr><tr><td>&quot;null_count&quot;</td><td>0.0</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td><td>&quot;0&quot;</td></tr><tr><td>&quot;mean&quot;</td><td>2.0221e7</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>5.306059</td><td>160805.352941</td><td>815.642353</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td>&quot;std&quot;</td><td>4.160387</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>3.974618</td><td>159439.770376</td><td>230047.143813</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td>&quot;min&quot;</td><td>2.0220707e7</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;买入&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;09:33:37&quot;</td><td>&quot;-10400.00&quot;</td><td>1.675</td><td>4884.0</td><td>-152125.86</td><td>&quot;2.90&quot;</td><td>&quot;137.13&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;25%&quot;</td><td>2.0220711e7</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>2.59</td><td>137344.0</td><td>-140526.48</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td>&quot;50%&quot;</td><td>2.0220718e7</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>3.65</td><td>139860.0</td><td>-139342.29</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td>&quot;75%&quot;</td><td>2.0220718e7</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>6.54</td><td>149930.0</td><td>136953.55</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td>&quot;max&quot;</td><td>2.0220721e7</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>13.51</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (9, 17)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ statisti ┆ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ c        ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ ---      ┆ f64      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "│ str      ┆          ┆          ┆          ┆   ┆         ┆         ┆         ┆        │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ count    ┆ 17.0     ┆ 17       ┆ 17       ┆ … ┆ 17      ┆ 17      ┆ 17      ┆ 17     │\n",
       "│ null_cou ┆ 0.0      ┆ 0        ┆ 0        ┆ … ┆ 0       ┆ 0       ┆ 0       ┆ 0      │\n",
       "│ nt       ┆          ┆          ┆          ┆   ┆         ┆         ┆         ┆        │\n",
       "│ mean     ┆ 2.0221e7 ┆ null     ┆ null     ┆ … ┆ null    ┆ null    ┆ null    ┆ null   │\n",
       "│ std      ┆ 4.160387 ┆ null     ┆ null     ┆ … ┆ null    ┆ null    ┆ null    ┆ null   │\n",
       "│ min      ┆ 2.022070 ┆ 204007   ┆ GC007    ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆ 7e7      ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 25%      ┆ 2.022071 ┆ null     ┆ null     ┆ … ┆ null    ┆ null    ┆ null    ┆ null   │\n",
       "│          ┆ 1e7      ┆          ┆          ┆   ┆         ┆         ┆         ┆        │\n",
       "│ 50%      ┆ 2.022071 ┆ null     ┆ null     ┆ … ┆ null    ┆ null    ┆ null    ┆ null   │\n",
       "│          ┆ 8e7      ┆          ┆          ┆   ┆         ┆         ┆         ┆        │\n",
       "│ 75%      ┆ 2.022071 ┆ null     ┆ null     ┆ … ┆ null    ┆ null    ┆ null    ┆ null   │\n",
       "│          ┆ 8e7      ┆          ┆          ┆   ┆         ┆         ┆         ┆        │\n",
       "│ max      ┆ 2.022072 ┆ =\"002462 ┆ 金隅集团 ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ 1e7      ┆ \"        ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "9d9516a8-e780-452e-9f6e-63608c412a50",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (1, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td><td>u32</td></tr></thead><tbody><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (1, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬────────┬──────┬──────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费 ┆ 其他费 ┆ 备注 ┆ 币种 │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---    ┆ ---  ┆ ---  │\n",
       "│ u32      ┆ u32      ┆ u32      ┆ u32      ┆   ┆ u32    ┆ u32    ┆ u32  ┆ u32  │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪════════╪══════╪══════╡\n",
       "│ 0        ┆ 0        ┆ 0        ┆ 0        ┆ … ┆ 0      ┆ 0      ┆ 0    ┆ 0    │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴────────┴──────┴──────┘"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.null_count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "c948e628-c09c-42b2-a676-15e83e2de555",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>发生日期</th>\n",
       "      <th>证券代码</th>\n",
       "      <th>证券名称</th>\n",
       "      <th>买卖标志</th>\n",
       "      <th>业务名称</th>\n",
       "      <th>成交时间</th>\n",
       "      <th>成交数量</th>\n",
       "      <th>成交价格</th>\n",
       "      <th>成交金额</th>\n",
       "      <th>发生金额</th>\n",
       "      <th>手续费</th>\n",
       "      <th>印花税</th>\n",
       "      <th>过户费</th>\n",
       "      <th>其他费</th>\n",
       "      <th>备注</th>\n",
       "      <th>币种</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20220721</td>\n",
       "      <td>600269</td>\n",
       "      <td>赣粤高速</td>\n",
       "      <td>卖出</td>\n",
       "      <td>股息入账</td>\n",
       "      <td>16:00:00</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>3.6000</td>\n",
       "      <td>4884.0</td>\n",
       "      <td>4884.00</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>股息入账:赣粤高速600269; 权益股数:40700;</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20220718</td>\n",
       "      <td>204007</td>\n",
       "      <td>GC007</td>\n",
       "      <td>卖出</td>\n",
       "      <td>拆出质押购回</td>\n",
       "      <td>19:03:27</td>\n",
       "      <td>-580.00</td>\n",
       "      <td>1.6750</td>\n",
       "      <td>58000.0</td>\n",
       "      <td>58018.63</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>融券购回:18.63实际占款天数：7-888880</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20220718</td>\n",
       "      <td>=\"002462\"</td>\n",
       "      <td>嘉事堂</td>\n",
       "      <td>卖出</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>09:38:10</td>\n",
       "      <td>-10400.00</td>\n",
       "      <td>13.2062</td>\n",
       "      <td>137344.0</td>\n",
       "      <td>137184.67</td>\n",
       "      <td>21.98</td>\n",
       "      <td>137.35</td>\n",
       "      <td>1.38</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>20220718</td>\n",
       "      <td>600408</td>\n",
       "      <td>安泰集团</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:44:52</td>\n",
       "      <td>47000.00</td>\n",
       "      <td>3.1900</td>\n",
       "      <td>149930.0</td>\n",
       "      <td>-149955.50</td>\n",
       "      <td>23.99</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.51</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20220718</td>\n",
       "      <td>600648</td>\n",
       "      <td>外高桥</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:44:31</td>\n",
       "      <td>11900.00</td>\n",
       "      <td>12.6066</td>\n",
       "      <td>150019.0</td>\n",
       "      <td>-150044.49</td>\n",
       "      <td>24.00</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.49</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>20220718</td>\n",
       "      <td>600269</td>\n",
       "      <td>赣粤高速</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:43:38</td>\n",
       "      <td>40700.00</td>\n",
       "      <td>3.6900</td>\n",
       "      <td>150183.0</td>\n",
       "      <td>-150208.53</td>\n",
       "      <td>24.03</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.50</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>20220718</td>\n",
       "      <td>600015</td>\n",
       "      <td>华夏银行</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:42:51</td>\n",
       "      <td>30000.00</td>\n",
       "      <td>5.0700</td>\n",
       "      <td>152100.0</td>\n",
       "      <td>-152125.86</td>\n",
       "      <td>24.34</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.52</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>20220718</td>\n",
       "      <td>601992</td>\n",
       "      <td>金隅集团</td>\n",
       "      <td>卖出</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>09:39:28</td>\n",
       "      <td>-54000.00</td>\n",
       "      <td>2.5683</td>\n",
       "      <td>138686.0</td>\n",
       "      <td>138523.74</td>\n",
       "      <td>22.19</td>\n",
       "      <td>138.69</td>\n",
       "      <td>1.38</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>20220718</td>\n",
       "      <td>600894</td>\n",
       "      <td>广日股份</td>\n",
       "      <td>卖出</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>09:39:06</td>\n",
       "      <td>-21400.00</td>\n",
       "      <td>6.5419</td>\n",
       "      <td>139996.0</td>\n",
       "      <td>139832.12</td>\n",
       "      <td>22.40</td>\n",
       "      <td>140.02</td>\n",
       "      <td>1.46</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>20220718</td>\n",
       "      <td>601077</td>\n",
       "      <td>渝农商行</td>\n",
       "      <td>卖出</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>09:38:30</td>\n",
       "      <td>-38300.00</td>\n",
       "      <td>3.5800</td>\n",
       "      <td>137114.0</td>\n",
       "      <td>136953.55</td>\n",
       "      <td>21.94</td>\n",
       "      <td>137.13</td>\n",
       "      <td>1.38</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券卖出</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>20220711</td>\n",
       "      <td>=\"002462\"</td>\n",
       "      <td>嘉事堂</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:38:16</td>\n",
       "      <td>10400.00</td>\n",
       "      <td>13.5100</td>\n",
       "      <td>140504.0</td>\n",
       "      <td>-140526.48</td>\n",
       "      <td>22.48</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.41</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>20220711</td>\n",
       "      <td>=\"000900\"</td>\n",
       "      <td>现代投资</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:33:37</td>\n",
       "      <td>34400.00</td>\n",
       "      <td>4.0500</td>\n",
       "      <td>139320.0</td>\n",
       "      <td>-139342.29</td>\n",
       "      <td>22.29</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.39</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>20220711</td>\n",
       "      <td>204007</td>\n",
       "      <td>GC007</td>\n",
       "      <td>卖出</td>\n",
       "      <td>质押回购拆出</td>\n",
       "      <td>09:39:27</td>\n",
       "      <td>580.00</td>\n",
       "      <td>1.6750</td>\n",
       "      <td>58000.0</td>\n",
       "      <td>-58002.90</td>\n",
       "      <td>2.90</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>融券回购购回日:20220718预计利息:18.63参考占款天数：7-888880</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>20220711</td>\n",
       "      <td>601992</td>\n",
       "      <td>金隅集团</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:37:25</td>\n",
       "      <td>54000.00</td>\n",
       "      <td>2.5900</td>\n",
       "      <td>139860.0</td>\n",
       "      <td>-139883.80</td>\n",
       "      <td>22.38</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.42</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>20220711</td>\n",
       "      <td>600894</td>\n",
       "      <td>广日股份</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:36:30</td>\n",
       "      <td>21400.00</td>\n",
       "      <td>6.5400</td>\n",
       "      <td>139956.0</td>\n",
       "      <td>-139979.80</td>\n",
       "      <td>22.39</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.41</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>20220711</td>\n",
       "      <td>601077</td>\n",
       "      <td>渝农商行</td>\n",
       "      <td>买入</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>09:34:24</td>\n",
       "      <td>38300.00</td>\n",
       "      <td>3.6500</td>\n",
       "      <td>139795.0</td>\n",
       "      <td>-139818.75</td>\n",
       "      <td>22.37</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>1.38</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>证券买入</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>20220707</td>\n",
       "      <td>204007</td>\n",
       "      <td>GC007</td>\n",
       "      <td>卖出</td>\n",
       "      <td>拆出质押购回</td>\n",
       "      <td>19:17:51</td>\n",
       "      <td>-7580.00</td>\n",
       "      <td>2.4600</td>\n",
       "      <td>758000.0</td>\n",
       "      <td>758357.61</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>=\"0.00\"</td>\n",
       "      <td>融券购回:357.61实际占款天数：7-888880</td>\n",
       "      <td>人民币</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        发生日期       证券代码   证券名称 买卖标志    业务名称      成交时间       成交数量     成交价格  \\\n",
       "0   20220721     600269   赣粤高速   卖出    股息入账  16:00:00    =\"0.00\"   3.6000   \n",
       "1   20220718     204007  GC007   卖出  拆出质押购回  19:03:27    -580.00   1.6750   \n",
       "2   20220718  =\"002462\"    嘉事堂   卖出    证券卖出  09:38:10  -10400.00  13.2062   \n",
       "3   20220718     600408   安泰集团   买入    证券买入  09:44:52   47000.00   3.1900   \n",
       "4   20220718     600648    外高桥   买入    证券买入  09:44:31   11900.00  12.6066   \n",
       "5   20220718     600269   赣粤高速   买入    证券买入  09:43:38   40700.00   3.6900   \n",
       "6   20220718     600015   华夏银行   买入    证券买入  09:42:51   30000.00   5.0700   \n",
       "7   20220718     601992   金隅集团   卖出    证券卖出  09:39:28  -54000.00   2.5683   \n",
       "8   20220718     600894   广日股份   卖出    证券卖出  09:39:06  -21400.00   6.5419   \n",
       "9   20220718     601077   渝农商行   卖出    证券卖出  09:38:30  -38300.00   3.5800   \n",
       "10  20220711  =\"002462\"    嘉事堂   买入    证券买入  09:38:16   10400.00  13.5100   \n",
       "11  20220711  =\"000900\"   现代投资   买入    证券买入  09:33:37   34400.00   4.0500   \n",
       "12  20220711     204007  GC007   卖出  质押回购拆出  09:39:27     580.00   1.6750   \n",
       "13  20220711     601992   金隅集团   买入    证券买入  09:37:25   54000.00   2.5900   \n",
       "14  20220711     600894   广日股份   买入    证券买入  09:36:30   21400.00   6.5400   \n",
       "15  20220711     601077   渝农商行   买入    证券买入  09:34:24   38300.00   3.6500   \n",
       "16  20220707     204007  GC007   卖出  拆出质押购回  19:17:51   -7580.00   2.4600   \n",
       "\n",
       "        成交金额       发生金额      手续费      印花税      过户费      其他费  \\\n",
       "0     4884.0    4884.00  =\"0.00\"  =\"0.00\"  =\"0.00\"  =\"0.00\"   \n",
       "1    58000.0   58018.63  =\"0.00\"  =\"0.00\"  =\"0.00\"  =\"0.00\"   \n",
       "2   137344.0  137184.67    21.98   137.35     1.38  =\"0.00\"   \n",
       "3   149930.0 -149955.50    23.99  =\"0.00\"     1.51  =\"0.00\"   \n",
       "4   150019.0 -150044.49    24.00  =\"0.00\"     1.49  =\"0.00\"   \n",
       "5   150183.0 -150208.53    24.03  =\"0.00\"     1.50  =\"0.00\"   \n",
       "6   152100.0 -152125.86    24.34  =\"0.00\"     1.52  =\"0.00\"   \n",
       "7   138686.0  138523.74    22.19   138.69     1.38  =\"0.00\"   \n",
       "8   139996.0  139832.12    22.40   140.02     1.46  =\"0.00\"   \n",
       "9   137114.0  136953.55    21.94   137.13     1.38  =\"0.00\"   \n",
       "10  140504.0 -140526.48    22.48  =\"0.00\"     1.41  =\"0.00\"   \n",
       "11  139320.0 -139342.29    22.29  =\"0.00\"     1.39  =\"0.00\"   \n",
       "12   58000.0  -58002.90     2.90  =\"0.00\"  =\"0.00\"  =\"0.00\"   \n",
       "13  139860.0 -139883.80    22.38  =\"0.00\"     1.42  =\"0.00\"   \n",
       "14  139956.0 -139979.80    22.39  =\"0.00\"     1.41  =\"0.00\"   \n",
       "15  139795.0 -139818.75    22.37  =\"0.00\"     1.38  =\"0.00\"   \n",
       "16  758000.0  758357.61  =\"0.00\"  =\"0.00\"  =\"0.00\"  =\"0.00\"   \n",
       "\n",
       "                                           备注   币种  \n",
       "0                股息入账:赣粤高速600269; 权益股数:40700;  人民币  \n",
       "1                   融券购回:18.63实际占款天数：7-888880  人民币  \n",
       "2                                        证券卖出  人民币  \n",
       "3                                        证券买入  人民币  \n",
       "4                                        证券买入  人民币  \n",
       "5                                        证券买入  人民币  \n",
       "6                                        证券买入  人民币  \n",
       "7                                        证券卖出  人民币  \n",
       "8                                        证券卖出  人民币  \n",
       "9                                        证券卖出  人民币  \n",
       "10                                       证券买入  人民币  \n",
       "11                                       证券买入  人民币  \n",
       "12  融券回购购回日:20220718预计利息:18.63参考占款天数：7-888880  人民币  \n",
       "13                                       证券买入  人民币  \n",
       "14                                       证券买入  人民币  \n",
       "15                                       证券买入  人民币  \n",
       "16                 融券购回:357.61实际占款天数：7-888880  人民币  "
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_pandas()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "f97d0670-36ea-411a-bfc5-f099d2b00b7e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.frame.DataFrame"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df.to_pandas())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "298a2b43-5881-4586-a880-bb39996050a9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pyarrow.Table\n",
       "发生日期: int64\n",
       "证券代码: large_string\n",
       "证券名称: large_string\n",
       "买卖标志: large_string\n",
       "业务名称: large_string\n",
       "成交时间: large_string\n",
       "成交数量: large_string\n",
       "成交价格: double\n",
       "成交金额: double\n",
       "发生金额: double\n",
       "手续费: large_string\n",
       "印花税: large_string\n",
       "过户费: large_string\n",
       "其他费: large_string\n",
       "备注: large_string\n",
       "币种: large_string\n",
       "----\n",
       "发生日期: [[20220721,20220718,20220718,20220718,20220718,...,20220711,20220711,20220711,20220711,20220707]]\n",
       "证券代码: [[\"600269\",\"204007\",\"=\"002462\"\",\"600408\",\"600648\",...,\"204007\",\"601992\",\"600894\",\"601077\",\"204007\"]]\n",
       "证券名称: [[\"赣粤高速\",\"GC007\",\"嘉事堂\",\"安泰集团\",\"外高桥\",...,\"GC007\",\"金隅集团\",\"广日股份\",\"渝农商行\",\"GC007\"]]\n",
       "买卖标志: [[\"卖出\",\"卖出\",\"卖出\",\"买入\",\"买入\",...,\"卖出\",\"买入\",\"买入\",\"买入\",\"卖出\"]]\n",
       "业务名称: [[\"股息入账\",\"拆出质押购回\",\"证券卖出\",\"证券买入\",\"证券买入\",...,\"质押回购拆出\",\"证券买入\",\"证券买入\",\"证券买入\",\"拆出质押购回\"]]\n",
       "成交时间: [[\"16:00:00\",\"19:03:27\",\"09:38:10\",\"09:44:52\",\"09:44:31\",...,\"09:39:27\",\"09:37:25\",\"09:36:30\",\"09:34:24\",\"19:17:51\"]]\n",
       "成交数量: [[\"=\"0.00\"\",\"-580.00\",\"-10400.00\",\"47000.00\",\"11900.00\",...,\"580.00\",\"54000.00\",\"21400.00\",\"38300.00\",\"-7580.00\"]]\n",
       "成交价格: [[3.6,1.675,13.2062,3.19,12.6066,...,1.675,2.59,6.54,3.65,2.46]]\n",
       "成交金额: [[4884,58000,137344,149930,150019,...,58000,139860,139956,139795,758000]]\n",
       "发生金额: [[4884,58018.63,137184.67,-149955.5,-150044.49,...,-58002.9,-139883.8,-139979.8,-139818.75,758357.61]]\n",
       "..."
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_arrow()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "id": "90eab111-373c-491c-bd24-d762ca87f7f4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'发生日期': 20220721,\n",
       "  '证券代码': '600269',\n",
       "  '证券名称': '赣粤高速',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '股息入账',\n",
       "  '成交时间': '16:00:00',\n",
       "  '成交数量': '=\"0.00\"',\n",
       "  '成交价格': 3.6,\n",
       "  '成交金额': 4884.0,\n",
       "  '发生金额': 4884.0,\n",
       "  '手续费': '=\"0.00\"',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '=\"0.00\"',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '股息入账:赣粤高速600269; 权益股数:40700;',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '204007',\n",
       "  '证券名称': 'GC007',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '拆出质押购回',\n",
       "  '成交时间': '19:03:27',\n",
       "  '成交数量': '-580.00',\n",
       "  '成交价格': 1.675,\n",
       "  '成交金额': 58000.0,\n",
       "  '发生金额': 58018.63,\n",
       "  '手续费': '=\"0.00\"',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '=\"0.00\"',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '融券购回:18.63实际占款天数：7-888880',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '=\"002462\"',\n",
       "  '证券名称': '嘉事堂',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '证券卖出',\n",
       "  '成交时间': '09:38:10',\n",
       "  '成交数量': '-10400.00',\n",
       "  '成交价格': 13.2062,\n",
       "  '成交金额': 137344.0,\n",
       "  '发生金额': 137184.67,\n",
       "  '手续费': '21.98',\n",
       "  '印花税': '137.35',\n",
       "  '过户费': '1.38',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券卖出',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '600408',\n",
       "  '证券名称': '安泰集团',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:44:52',\n",
       "  '成交数量': '47000.00',\n",
       "  '成交价格': 3.19,\n",
       "  '成交金额': 149930.0,\n",
       "  '发生金额': -149955.5,\n",
       "  '手续费': '23.99',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.51',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '600648',\n",
       "  '证券名称': '外高桥',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:44:31',\n",
       "  '成交数量': '11900.00',\n",
       "  '成交价格': 12.6066,\n",
       "  '成交金额': 150019.0,\n",
       "  '发生金额': -150044.49,\n",
       "  '手续费': '24.00',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.49',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '600269',\n",
       "  '证券名称': '赣粤高速',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:43:38',\n",
       "  '成交数量': '40700.00',\n",
       "  '成交价格': 3.69,\n",
       "  '成交金额': 150183.0,\n",
       "  '发生金额': -150208.53,\n",
       "  '手续费': '24.03',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.50',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '600015',\n",
       "  '证券名称': '华夏银行',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:42:51',\n",
       "  '成交数量': '30000.00',\n",
       "  '成交价格': 5.07,\n",
       "  '成交金额': 152100.0,\n",
       "  '发生金额': -152125.86,\n",
       "  '手续费': '24.34',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.52',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '601992',\n",
       "  '证券名称': '金隅集团',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '证券卖出',\n",
       "  '成交时间': '09:39:28',\n",
       "  '成交数量': '-54000.00',\n",
       "  '成交价格': 2.5683,\n",
       "  '成交金额': 138686.0,\n",
       "  '发生金额': 138523.74,\n",
       "  '手续费': '22.19',\n",
       "  '印花税': '138.69',\n",
       "  '过户费': '1.38',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券卖出',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '600894',\n",
       "  '证券名称': '广日股份',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '证券卖出',\n",
       "  '成交时间': '09:39:06',\n",
       "  '成交数量': '-21400.00',\n",
       "  '成交价格': 6.5419,\n",
       "  '成交金额': 139996.0,\n",
       "  '发生金额': 139832.12,\n",
       "  '手续费': '22.40',\n",
       "  '印花税': '140.02',\n",
       "  '过户费': '1.46',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券卖出',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220718,\n",
       "  '证券代码': '601077',\n",
       "  '证券名称': '渝农商行',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '证券卖出',\n",
       "  '成交时间': '09:38:30',\n",
       "  '成交数量': '-38300.00',\n",
       "  '成交价格': 3.58,\n",
       "  '成交金额': 137114.0,\n",
       "  '发生金额': 136953.55,\n",
       "  '手续费': '21.94',\n",
       "  '印花税': '137.13',\n",
       "  '过户费': '1.38',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券卖出',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220711,\n",
       "  '证券代码': '=\"002462\"',\n",
       "  '证券名称': '嘉事堂',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:38:16',\n",
       "  '成交数量': '10400.00',\n",
       "  '成交价格': 13.51,\n",
       "  '成交金额': 140504.0,\n",
       "  '发生金额': -140526.48,\n",
       "  '手续费': '22.48',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.41',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220711,\n",
       "  '证券代码': '=\"000900\"',\n",
       "  '证券名称': '现代投资',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:33:37',\n",
       "  '成交数量': '34400.00',\n",
       "  '成交价格': 4.05,\n",
       "  '成交金额': 139320.0,\n",
       "  '发生金额': -139342.29,\n",
       "  '手续费': '22.29',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.39',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220711,\n",
       "  '证券代码': '204007',\n",
       "  '证券名称': 'GC007',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '质押回购拆出',\n",
       "  '成交时间': '09:39:27',\n",
       "  '成交数量': '580.00',\n",
       "  '成交价格': 1.675,\n",
       "  '成交金额': 58000.0,\n",
       "  '发生金额': -58002.9,\n",
       "  '手续费': '2.90',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '=\"0.00\"',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '融券回购购回日:20220718预计利息:18.63参考占款天数：7-888880',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220711,\n",
       "  '证券代码': '601992',\n",
       "  '证券名称': '金隅集团',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:37:25',\n",
       "  '成交数量': '54000.00',\n",
       "  '成交价格': 2.59,\n",
       "  '成交金额': 139860.0,\n",
       "  '发生金额': -139883.8,\n",
       "  '手续费': '22.38',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.42',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220711,\n",
       "  '证券代码': '600894',\n",
       "  '证券名称': '广日股份',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:36:30',\n",
       "  '成交数量': '21400.00',\n",
       "  '成交价格': 6.54,\n",
       "  '成交金额': 139956.0,\n",
       "  '发生金额': -139979.8,\n",
       "  '手续费': '22.39',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.41',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220711,\n",
       "  '证券代码': '601077',\n",
       "  '证券名称': '渝农商行',\n",
       "  '买卖标志': '买入',\n",
       "  '业务名称': '证券买入',\n",
       "  '成交时间': '09:34:24',\n",
       "  '成交数量': '38300.00',\n",
       "  '成交价格': 3.65,\n",
       "  '成交金额': 139795.0,\n",
       "  '发生金额': -139818.75,\n",
       "  '手续费': '22.37',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '1.38',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '证券买入',\n",
       "  '币种': '人民币'},\n",
       " {'发生日期': 20220707,\n",
       "  '证券代码': '204007',\n",
       "  '证券名称': 'GC007',\n",
       "  '买卖标志': '卖出',\n",
       "  '业务名称': '拆出质押购回',\n",
       "  '成交时间': '19:17:51',\n",
       "  '成交数量': '-7580.00',\n",
       "  '成交价格': 2.46,\n",
       "  '成交金额': 758000.0,\n",
       "  '发生金额': 758357.61,\n",
       "  '手续费': '=\"0.00\"',\n",
       "  '印花税': '=\"0.00\"',\n",
       "  '过户费': '=\"0.00\"',\n",
       "  '其他费': '=\"0.00\"',\n",
       "  '备注': '融券购回:357.61实际占款天数：7-888880',\n",
       "  '币种': '人民币'}]"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_dicts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "ba5a7ea3-6778-4570-b5b5-ba21b2611255",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "list"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df.to_dicts())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "292ad743-1f14-4a43-a1fd-878f36d47963",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(20220721,\n",
       "  '600269',\n",
       "  '赣粤高速',\n",
       "  '卖出',\n",
       "  '股息入账',\n",
       "  '16:00:00',\n",
       "  '=\"0.00\"',\n",
       "  3.6,\n",
       "  4884.0,\n",
       "  4884.0,\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '股息入账:赣粤高速600269; 权益股数:40700;',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '204007',\n",
       "  'GC007',\n",
       "  '卖出',\n",
       "  '拆出质押购回',\n",
       "  '19:03:27',\n",
       "  '-580.00',\n",
       "  1.675,\n",
       "  58000.0,\n",
       "  58018.63,\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '融券购回:18.63实际占款天数：7-888880',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '=\"002462\"',\n",
       "  '嘉事堂',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:38:10',\n",
       "  '-10400.00',\n",
       "  13.2062,\n",
       "  137344.0,\n",
       "  137184.67,\n",
       "  '21.98',\n",
       "  '137.35',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600408',\n",
       "  '安泰集团',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:44:52',\n",
       "  '47000.00',\n",
       "  3.19,\n",
       "  149930.0,\n",
       "  -149955.5,\n",
       "  '23.99',\n",
       "  '=\"0.00\"',\n",
       "  '1.51',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600648',\n",
       "  '外高桥',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:44:31',\n",
       "  '11900.00',\n",
       "  12.6066,\n",
       "  150019.0,\n",
       "  -150044.49,\n",
       "  '24.00',\n",
       "  '=\"0.00\"',\n",
       "  '1.49',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600269',\n",
       "  '赣粤高速',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:43:38',\n",
       "  '40700.00',\n",
       "  3.69,\n",
       "  150183.0,\n",
       "  -150208.53,\n",
       "  '24.03',\n",
       "  '=\"0.00\"',\n",
       "  '1.50',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600015',\n",
       "  '华夏银行',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:42:51',\n",
       "  '30000.00',\n",
       "  5.07,\n",
       "  152100.0,\n",
       "  -152125.86,\n",
       "  '24.34',\n",
       "  '=\"0.00\"',\n",
       "  '1.52',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '601992',\n",
       "  '金隅集团',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:39:28',\n",
       "  '-54000.00',\n",
       "  2.5683,\n",
       "  138686.0,\n",
       "  138523.74,\n",
       "  '22.19',\n",
       "  '138.69',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '600894',\n",
       "  '广日股份',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:39:06',\n",
       "  '-21400.00',\n",
       "  6.5419,\n",
       "  139996.0,\n",
       "  139832.12,\n",
       "  '22.40',\n",
       "  '140.02',\n",
       "  '1.46',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220718,\n",
       "  '601077',\n",
       "  '渝农商行',\n",
       "  '卖出',\n",
       "  '证券卖出',\n",
       "  '09:38:30',\n",
       "  '-38300.00',\n",
       "  3.58,\n",
       "  137114.0,\n",
       "  136953.55,\n",
       "  '21.94',\n",
       "  '137.13',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券卖出',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '=\"002462\"',\n",
       "  '嘉事堂',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:38:16',\n",
       "  '10400.00',\n",
       "  13.51,\n",
       "  140504.0,\n",
       "  -140526.48,\n",
       "  '22.48',\n",
       "  '=\"0.00\"',\n",
       "  '1.41',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '=\"000900\"',\n",
       "  '现代投资',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:33:37',\n",
       "  '34400.00',\n",
       "  4.05,\n",
       "  139320.0,\n",
       "  -139342.29,\n",
       "  '22.29',\n",
       "  '=\"0.00\"',\n",
       "  '1.39',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '204007',\n",
       "  'GC007',\n",
       "  '卖出',\n",
       "  '质押回购拆出',\n",
       "  '09:39:27',\n",
       "  '580.00',\n",
       "  1.675,\n",
       "  58000.0,\n",
       "  -58002.9,\n",
       "  '2.90',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '融券回购购回日:20220718预计利息:18.63参考占款天数：7-888880',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '601992',\n",
       "  '金隅集团',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:37:25',\n",
       "  '54000.00',\n",
       "  2.59,\n",
       "  139860.0,\n",
       "  -139883.8,\n",
       "  '22.38',\n",
       "  '=\"0.00\"',\n",
       "  '1.42',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '600894',\n",
       "  '广日股份',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:36:30',\n",
       "  '21400.00',\n",
       "  6.54,\n",
       "  139956.0,\n",
       "  -139979.8,\n",
       "  '22.39',\n",
       "  '=\"0.00\"',\n",
       "  '1.41',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220711,\n",
       "  '601077',\n",
       "  '渝农商行',\n",
       "  '买入',\n",
       "  '证券买入',\n",
       "  '09:34:24',\n",
       "  '38300.00',\n",
       "  3.65,\n",
       "  139795.0,\n",
       "  -139818.75,\n",
       "  '22.37',\n",
       "  '=\"0.00\"',\n",
       "  '1.38',\n",
       "  '=\"0.00\"',\n",
       "  '证券买入',\n",
       "  '人民币'),\n",
       " (20220707,\n",
       "  '204007',\n",
       "  'GC007',\n",
       "  '卖出',\n",
       "  '拆出质押购回',\n",
       "  '19:17:51',\n",
       "  '-7580.00',\n",
       "  2.46,\n",
       "  758000.0,\n",
       "  758357.61,\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '=\"0.00\"',\n",
       "  '融券购回:357.61实际占款天数：7-888880',\n",
       "  '人民币')]"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.rows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "129d92f6-da8d-45f1-a88e-51236d2ce94d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th></tr><tr><td>i64</td></tr></thead><tbody><tr><td>20220721</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>&hellip;</td></tr><tr><td>20220711</td></tr><tr><td>20220711</td></tr><tr><td>20220711</td></tr><tr><td>20220711</td></tr><tr><td>20220707</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17,)\n",
       "Series: '发生日期' [i64]\n",
       "[\n",
       "\t20220721\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t…\n",
       "\t20220711\n",
       "\t20220711\n",
       "\t20220711\n",
       "\t20220711\n",
       "\t20220707\n",
       "]"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_series()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "ad7e60a7-e01c-4d3b-ba83-6699aa175cc2",
   "metadata": {},
   "outputs": [],
   "source": [
    "s = df.to_series()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "2bb0ed66-b4a7-4517-9f10-1a65df4bde03",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'发生日期'"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "68870fe5-5f40-45e2-a8a8-234dbc9003d9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "6336c515-09df-4c5d-bda3-1f1eb29e74aa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(17,)"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "2d878d4f-f2d5-4d81-b772-2f05d7f700cf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "17"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.len()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "55781f4e-c7b4-4cda-94c3-169b4dba714c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th></tr><tr><td>i64</td></tr></thead><tbody><tr><td>20220721</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5,)\n",
       "Series: '发生日期' [i64]\n",
       "[\n",
       "\t20220721\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t20220718\n",
       "\t20220718\n",
       "]"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s[:5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "b2d5b666-aa55-42f3-afff-626fab281099",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (3,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th></tr><tr><td>i64</td></tr></thead><tbody><tr><td>20220721</td></tr><tr><td>20220718</td></tr><tr><td>20220718</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (3,)\n",
       "Series: '发生日期' [i64]\n",
       "[\n",
       "\t20220721\n",
       "\t20220718\n",
       "\t20220718\n",
       "]"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s[[0, 6, 8]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "268cc5fb-51dc-4505-b2c9-562167c3ff8f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (10,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券代码</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;601992&quot;</td></tr><tr><td>&quot;600408&quot;</td></tr><tr><td>&quot;204007&quot;</td></tr><tr><td>&quot;600015&quot;</td></tr><tr><td>&quot;600269&quot;</td></tr><tr><td>&quot;601077&quot;</td></tr><tr><td>&quot;=&quot;000900&quot;&quot;</td></tr><tr><td>&quot;600894&quot;</td></tr><tr><td>&quot;=&quot;002462&quot;&quot;</td></tr><tr><td>&quot;600648&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (10,)\n",
       "Series: '证券代码' [str]\n",
       "[\n",
       "\t\"601992\"\n",
       "\t\"600408\"\n",
       "\t\"204007\"\n",
       "\t\"600015\"\n",
       "\t\"600269\"\n",
       "\t\"601077\"\n",
       "\t\"=\"000900\"\"\n",
       "\t\"600894\"\n",
       "\t\"=\"002462\"\"\n",
       "\t\"600648\"\n",
       "]"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_series(1).unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "643340c1-251b-4cd2-86ff-3bb782187590",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (10,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券名称</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;外高桥&quot;</td></tr><tr><td>&quot;渝农商行&quot;</td></tr><tr><td>&quot;安泰集团&quot;</td></tr><tr><td>&quot;现代投资&quot;</td></tr><tr><td>&quot;嘉事堂&quot;</td></tr><tr><td>&quot;赣粤高速&quot;</td></tr><tr><td>&quot;华夏银行&quot;</td></tr><tr><td>&quot;GC007&quot;</td></tr><tr><td>&quot;金隅集团&quot;</td></tr><tr><td>&quot;广日股份&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (10,)\n",
       "Series: '证券名称' [str]\n",
       "[\n",
       "\t\"外高桥\"\n",
       "\t\"渝农商行\"\n",
       "\t\"安泰集团\"\n",
       "\t\"现代投资\"\n",
       "\t\"嘉事堂\"\n",
       "\t\"赣粤高速\"\n",
       "\t\"华夏银行\"\n",
       "\t\"GC007\"\n",
       "\t\"金隅集团\"\n",
       "\t\"广日股份\"\n",
       "]"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_series(2).unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "093b2183-bea8-4006-a592-ef785d7f0c7c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>业务名称</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;证券卖出&quot;</td></tr><tr><td>&quot;拆出质押购回&quot;</td></tr><tr><td>&quot;证券买入&quot;</td></tr><tr><td>&quot;股息入账&quot;</td></tr><tr><td>&quot;质押回购拆出&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5,)\n",
       "Series: '业务名称' [str]\n",
       "[\n",
       "\t\"证券卖出\"\n",
       "\t\"拆出质押购回\"\n",
       "\t\"证券买入\"\n",
       "\t\"股息入账\"\n",
       "\t\"质押回购拆出\"\n",
       "]"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_series(4).unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "7e3b2495-2eb3-460d-96ec-83dd5898f9a5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (5, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>印花税</th><th>count</th></tr><tr><td>str</td><td>u32</td></tr></thead><tbody><tr><td>&quot;=&quot;0.00&quot;&quot;</td><td>13</td></tr><tr><td>&quot;137.35&quot;</td><td>1</td></tr><tr><td>&quot;138.69&quot;</td><td>1</td></tr><tr><td>&quot;137.13&quot;</td><td>1</td></tr><tr><td>&quot;140.02&quot;</td><td>1</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (5, 2)\n",
       "┌─────────┬───────┐\n",
       "│ 印花税  ┆ count │\n",
       "│ ---     ┆ ---   │\n",
       "│ str     ┆ u32   │\n",
       "╞═════════╪═══════╡\n",
       "│ =\"0.00\" ┆ 13    │\n",
       "│ 137.35  ┆ 1     │\n",
       "│ 138.69  ┆ 1     │\n",
       "│ 137.13  ┆ 1     │\n",
       "│ 140.02  ┆ 1     │\n",
       "└─────────┴───────┘"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_series(11).value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "ed948a77-12e0-4e44-b7cf-f9737266ecef",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (9, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>statistic</th><th>value</th></tr><tr><td>str</td><td>f64</td></tr></thead><tbody><tr><td>&quot;count&quot;</td><td>17.0</td></tr><tr><td>&quot;null_count&quot;</td><td>0.0</td></tr><tr><td>&quot;mean&quot;</td><td>815.642353</td></tr><tr><td>&quot;std&quot;</td><td>230047.143813</td></tr><tr><td>&quot;min&quot;</td><td>-152125.86</td></tr><tr><td>&quot;25%&quot;</td><td>-140526.48</td></tr><tr><td>&quot;50%&quot;</td><td>-139342.29</td></tr><tr><td>&quot;75%&quot;</td><td>136953.55</td></tr><tr><td>&quot;max&quot;</td><td>758357.61</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (9, 2)\n",
       "┌────────────┬───────────────┐\n",
       "│ statistic  ┆ value         │\n",
       "│ ---        ┆ ---           │\n",
       "│ str        ┆ f64           │\n",
       "╞════════════╪═══════════════╡\n",
       "│ count      ┆ 17.0          │\n",
       "│ null_count ┆ 0.0           │\n",
       "│ mean       ┆ 815.642353    │\n",
       "│ std        ┆ 230047.143813 │\n",
       "│ min        ┆ -152125.86    │\n",
       "│ 25%        ┆ -140526.48    │\n",
       "│ 50%        ┆ -139342.29    │\n",
       "│ 75%        ┆ 136953.55     │\n",
       "│ max        ┆ 758357.61     │\n",
       "└────────────┴───────────────┘"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, \"发生金额\"].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "908d8774-2fc8-49dd-a1ed-f2b91a792c6a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[4884.0,\n",
       " 58018.63,\n",
       " 137184.67,\n",
       " -149955.5,\n",
       " -150044.49,\n",
       " -150208.53,\n",
       " -152125.86,\n",
       " 138523.74,\n",
       " 139832.12,\n",
       " 136953.55,\n",
       " -140526.48,\n",
       " -139342.29,\n",
       " -58002.9,\n",
       " -139883.8,\n",
       " -139979.8,\n",
       " -139818.75,\n",
       " 758357.61]"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:, \"发生金额\"].to_list()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "c3e96ffe-0fcc-46e0-83b8-742077ba1024",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rows: 17\n",
      "Columns: 16\n",
      "$ 发生日期 <i64> 20220721, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718, 20220718\n",
      "$ 证券代码 <str> '600269', '204007', '=\"002462\"', '600408', '600648', '600269', '600015', '601992', '600894', '601077'\n",
      "$ 证券名称 <str> '赣粤高速', 'GC007', '嘉事堂', '安泰集团', '外高桥', '赣粤高速', '华夏银行', '金隅集团', '广日股份', '渝农商行'\n",
      "$ 买卖标志 <str> '卖出', '卖出', '卖出', '买入', '买入', '买入', '买入', '卖出', '卖出', '卖出'\n",
      "$ 业务名称 <str> '股息入账', '拆出质押购回', '证券卖出', '证券买入', '证券买入', '证券买入', '证券买入', '证券卖出', '证券卖出', '证券卖出'\n",
      "$ 成交时间 <str> '16:00:00', '19:03:27', '09:38:10', '09:44:52', '09:44:31', '09:43:38', '09:42:51', '09:39:28', '09:39:06', '09:38:30'\n",
      "$ 成交数量 <str> '=\"0.00\"', '-580.00', '-10400.00', '47000.00', '11900.00', '40700.00', '30000.00', '-54000.00', '-21400.00', '-38300.00'\n",
      "$ 成交价格 <f64> 3.6, 1.675, 13.2062, 3.19, 12.6066, 3.69, 5.07, 2.5683, 6.5419, 3.58\n",
      "$ 成交金额 <f64> 4884.0, 58000.0, 137344.0, 149930.0, 150019.0, 150183.0, 152100.0, 138686.0, 139996.0, 137114.0\n",
      "$ 发生金额 <f64> 4884.0, 58018.63, 137184.67, -149955.5, -150044.49, -150208.53, -152125.86, 138523.74, 139832.12, 136953.55\n",
      "$ 手续费  <str> '=\"0.00\"', '=\"0.00\"', '21.98', '23.99', '24.00', '24.03', '24.34', '22.19', '22.40', '21.94'\n",
      "$ 印花税  <str> '=\"0.00\"', '=\"0.00\"', '137.35', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '138.69', '140.02', '137.13'\n",
      "$ 过户费  <str> '=\"0.00\"', '=\"0.00\"', '1.38', '1.51', '1.49', '1.50', '1.52', '1.38', '1.46', '1.38'\n",
      "$ 其他费  <str> '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"', '=\"0.00\"'\n",
      "$ 备注   <str> '股息入账:赣粤高速600269; 权益股数:40700;', '融券购回:18.63实际占款天数：7-888880', '证券卖出', '证券买入', '证券买入', '证券买入', '证券买入', '证券卖出', '证券卖出', '证券卖出'\n",
      "$ 币种   <str> '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币', '人民币'\n",
      "\n"
     ]
    }
   ],
   "source": [
    "df.glimpse()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "dc58602b-ee43-4143-aa2f-b55f291bbac7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;20220721&quot;</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;3.6000&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220718&quot;</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;58018.63&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220718&quot;</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>&quot;13.2062&quot;</td><td>&quot;137344.00&quot;</td><td>&quot;137184.67&quot;</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220718&quot;</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>&quot;3.1900&quot;</td><td>&quot;149930.00&quot;</td><td>&quot;-149955.50&quot;</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220718&quot;</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>&quot;12.6066&quot;</td><td>&quot;150019.00&quot;</td><td>&quot;-150044.49&quot;</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;20220711&quot;</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;-58002.90&quot;</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220711&quot;</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>&quot;2.5900&quot;</td><td>&quot;139860.00&quot;</td><td>&quot;-139883.80&quot;</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220711&quot;</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>&quot;6.5400&quot;</td><td>&quot;139956.00&quot;</td><td>&quot;-139979.80&quot;</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220711&quot;</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>&quot;3.6500&quot;</td><td>&quot;139795.00&quot;</td><td>&quot;-139818.75&quot;</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&quot;20220707&quot;</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>&quot;2.4600&quot;</td><td>&quot;758000.00&quot;</td><td>&quot;758357.61&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ str      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pl.read_csv(\n",
    "    \"stock_trades/202207-湘财.xls\",\n",
    "    encoding=\"gb18030\",\n",
    "    separator=\"\\t\",\n",
    "    infer_schema=False,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "fac49825-9cd0-498a-9476-f25d19431384",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>20220721</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>3.6</td><td>4884.0</td><td>4884.0</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>1.675</td><td>58000.0</td><td>58018.63</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220718</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>20220711</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>1.675</td><td>58000.0</td><td>-58002.9</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>2.59</td><td>139860.0</td><td>-139883.8</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>6.54</td><td>139956.0</td><td>-139979.8</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220711</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>3.65</td><td>139795.0</td><td>-139818.75</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>20220707</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>2.46</td><td>758000.0</td><td>758357.61</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ i64      ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 20220721 ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 20220718 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 20220718 ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│          ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 20220718 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220718 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 20220711 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 20220711 ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220711 ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 20220707 ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "56f9ad24-513c-4e2e-8ada-7dd8a41e1049",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pl.read_csv(\n",
    "    \"stock_trades/202207-湘财.xls\",\n",
    "    encoding=\"gb18030\",\n",
    "    separator=\"\\t\",\n",
    "    infer_schema=False,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "633b8602-1e74-4a10-a3de-84f9e86c3e52",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>date</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>2022-07-21</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;3.6000&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;58018.63&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>&quot;13.2062&quot;</td><td>&quot;137344.00&quot;</td><td>&quot;137184.67&quot;</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>&quot;3.1900&quot;</td><td>&quot;149930.00&quot;</td><td>&quot;-149955.50&quot;</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>&quot;12.6066&quot;</td><td>&quot;150019.00&quot;</td><td>&quot;-150044.49&quot;</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>2022-07-11</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;-58002.90&quot;</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>&quot;2.5900&quot;</td><td>&quot;139860.00&quot;</td><td>&quot;-139883.80&quot;</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>&quot;6.5400&quot;</td><td>&quot;139956.00&quot;</td><td>&quot;-139979.80&quot;</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>&quot;3.6500&quot;</td><td>&quot;139795.00&quot;</td><td>&quot;-139818.75&quot;</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-07</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>&quot;2.4600&quot;</td><td>&quot;758000.00&quot;</td><td>&quot;758357.61&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ date     ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 2022-07- ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│ 21       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 2022-07- ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│ 18       ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 2022-07- ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 2022-07- ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 07       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.with_columns(\n",
    "    pl.col(\"发生日期\").str.to_date(\"%Y%m%d\"),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "18d861eb-2ddd-42c8-af02-3e6310d96e8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>date</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>2022-07-21</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;3.6000&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;58018.63&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>&quot;13.2062&quot;</td><td>&quot;137344.00&quot;</td><td>&quot;137184.67&quot;</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>&quot;3.1900&quot;</td><td>&quot;149930.00&quot;</td><td>&quot;-149955.50&quot;</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>&quot;12.6066&quot;</td><td>&quot;150019.00&quot;</td><td>&quot;-150044.49&quot;</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>2022-07-11</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;-58002.90&quot;</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>&quot;2.5900&quot;</td><td>&quot;139860.00&quot;</td><td>&quot;-139883.80&quot;</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>&quot;6.5400&quot;</td><td>&quot;139956.00&quot;</td><td>&quot;-139979.80&quot;</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>&quot;3.6500&quot;</td><td>&quot;139795.00&quot;</td><td>&quot;-139818.75&quot;</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-07</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>&quot;2.4600&quot;</td><td>&quot;758000.00&quot;</td><td>&quot;758357.61&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ date     ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 2022-07- ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│ 21       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 2022-07- ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│ 18       ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 2022-07- ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 2022-07- ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 07       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pl.read_csv(\n",
    "    \"stock_trades/202207-湘财.xls\",\n",
    "    encoding=\"gb18030\",\n",
    "    separator=\"\\t\",\n",
    "    infer_schema=False,\n",
    ")\n",
    "df = df.with_columns(\n",
    "    pl.col(\"发生日期\").str.to_date(\"%Y%m%d\"),\n",
    ")\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "5eac7b52-9bd7-43f5-aa14-21a5c45992b2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>date</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>2022-07-21</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;3.6000&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;58018.63&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>&quot;13.2062&quot;</td><td>&quot;137344.00&quot;</td><td>&quot;137184.67&quot;</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>&quot;3.1900&quot;</td><td>&quot;149930.00&quot;</td><td>&quot;-149955.50&quot;</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>&quot;12.6066&quot;</td><td>&quot;150019.00&quot;</td><td>&quot;-150044.49&quot;</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>2022-07-11</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;-58002.90&quot;</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>&quot;2.5900&quot;</td><td>&quot;139860.00&quot;</td><td>&quot;-139883.80&quot;</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>&quot;6.5400&quot;</td><td>&quot;139956.00&quot;</td><td>&quot;-139979.80&quot;</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>&quot;3.6500&quot;</td><td>&quot;139795.00&quot;</td><td>&quot;-139818.75&quot;</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-07</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>&quot;2.4600&quot;</td><td>&quot;758000.00&quot;</td><td>&quot;758357.61&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ date     ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 2022-07- ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│ 21       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 2022-07- ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│ 18       ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 2022-07- ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 2022-07- ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 07       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pl.read_csv(\n",
    "    \"stock_trades/202207-湘财.xls\",\n",
    "    encoding=\"gb18030\",\n",
    "    separator=\"\\t\",\n",
    "    infer_schema=False,\n",
    ")\n",
    "df = df.with_columns(\n",
    "    pl.col(\"发生日期\").str.to_date(\"%Y%m%d\"),\n",
    ")\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "fd6bd2ad-ba1b-44c2-8cee-2cf7aac97772",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (17, 16)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th></tr><tr><td>date</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>2022-07-21</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;卖出&quot;</td><td>&quot;股息入账&quot;</td><td>&quot;16:00:00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;3.6000&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;4884.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;股息入账:赣粤高速600269; 权益股数:40700;&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:03:27&quot;</td><td>&quot;-580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;58018.63&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:18.63实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;=&quot;002462&quot;&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;09:38:10&quot;</td><td>&quot;-10400.00&quot;</td><td>&quot;13.2062&quot;</td><td>&quot;137344.00&quot;</td><td>&quot;137184.67&quot;</td><td>&quot;21.98&quot;</td><td>&quot;137.35&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:52&quot;</td><td>&quot;47000.00&quot;</td><td>&quot;3.1900&quot;</td><td>&quot;149930.00&quot;</td><td>&quot;-149955.50&quot;</td><td>&quot;23.99&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.51&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:44:31&quot;</td><td>&quot;11900.00&quot;</td><td>&quot;12.6066&quot;</td><td>&quot;150019.00&quot;</td><td>&quot;-150044.49&quot;</td><td>&quot;24.00&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.49&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>2022-07-11</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;质押回购拆出&quot;</td><td>&quot;09:39:27&quot;</td><td>&quot;580.00&quot;</td><td>&quot;1.6750&quot;</td><td>&quot;58000.00&quot;</td><td>&quot;-58002.90&quot;</td><td>&quot;2.90&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券回购购回日:20220718预计利息:18.63参考占款…</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:37:25&quot;</td><td>&quot;54000.00&quot;</td><td>&quot;2.5900&quot;</td><td>&quot;139860.00&quot;</td><td>&quot;-139883.80&quot;</td><td>&quot;22.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.42&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;600894&quot;</td><td>&quot;广日股份&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:36:30&quot;</td><td>&quot;21400.00&quot;</td><td>&quot;6.5400&quot;</td><td>&quot;139956.00&quot;</td><td>&quot;-139979.80&quot;</td><td>&quot;22.39&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.41&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-11</td><td>&quot;601077&quot;</td><td>&quot;渝农商行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;09:34:24&quot;</td><td>&quot;38300.00&quot;</td><td>&quot;3.6500&quot;</td><td>&quot;139795.00&quot;</td><td>&quot;-139818.75&quot;</td><td>&quot;22.37&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;1.38&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td></tr><tr><td>2022-07-07</td><td>&quot;204007&quot;</td><td>&quot;GC007&quot;</td><td>&quot;卖出&quot;</td><td>&quot;拆出质押购回&quot;</td><td>&quot;19:17:51&quot;</td><td>&quot;-7580.00&quot;</td><td>&quot;2.4600&quot;</td><td>&quot;758000.00&quot;</td><td>&quot;758357.61&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;=&quot;0.00&quot;&quot;</td><td>&quot;融券购回:357.61实际占款天数：7-888880&quot;</td><td>&quot;人民币&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (17, 16)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬─────────┬─────────┬─────────┬────────┐\n",
       "│ 发生日期 ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 过户费  ┆ 其他费  ┆ 备注    ┆ 币种   │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---     ┆ ---     ┆ ---     ┆ ---    │\n",
       "│ date     ┆ str      ┆ str      ┆ str      ┆   ┆ str     ┆ str     ┆ str     ┆ str    │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪═════════╪═════════╪═════════╪════════╡\n",
       "│ 2022-07- ┆ 600269   ┆ 赣粤高速 ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 股息入  ┆ 人民币 │\n",
       "│ 21       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 账:赣粤 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 高速600 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 269;    ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 权益股  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数:4070 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0;      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:18.6 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 3实际占 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 款天数  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ ：7-888 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 880     ┆        │\n",
       "│ 2022-07- ┆ =\"002462 ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券卖  ┆ 人民币 │\n",
       "│ 18       ┆ \"        ┆          ┆          ┆   ┆         ┆         ┆ 出      ┆        │\n",
       "│ 2022-07- ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 1.51    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 1.49    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 18       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …       ┆ …       ┆ …       ┆ …      │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券回  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 购购回  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 日:2022 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 0718预  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 计利息: ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 18.63参 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 考占款… ┆        │\n",
       "│ 2022-07- ┆ 601992   ┆ 金隅集团 ┆ 买入     ┆ … ┆ 1.42    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 600894   ┆ 广日股份 ┆ 买入     ┆ … ┆ 1.41    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 601077   ┆ 渝农商行 ┆ 买入     ┆ … ┆ 1.38    ┆ =\"0.00\" ┆ 证券买  ┆ 人民币 │\n",
       "│ 11       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 入      ┆        │\n",
       "│ 2022-07- ┆ 204007   ┆ GC007    ┆ 卖出     ┆ … ┆ =\"0.00\" ┆ =\"0.00\" ┆ 融券购  ┆ 人民币 │\n",
       "│ 07       ┆          ┆          ┆          ┆   ┆         ┆         ┆ 回:357. ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 61实际  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 占款天  ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 数：7-8 ┆        │\n",
       "│          ┆          ┆          ┆          ┆   ┆         ┆         ┆ 88880   ┆        │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴─────────┴─────────┴─────────┴────────┘"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pl.read_csv(\n",
    "    \"stock_trades/202207-湘财.xls\",\n",
    "    encoding=\"gb18030\",\n",
    "    separator=\"\\t\",\n",
    "    infer_schema=False,\n",
    ")\n",
    "df = df.with_columns(\n",
    "    pl.col(\"发生日期\").str.to_date(\"%Y%m%d\"),\n",
    ")\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "943badff-0849-4f93-85a3-6e0d41220f29",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Schema([('发生日期', Date),\n",
       "        ('证券代码', String),\n",
       "        ('证券名称', String),\n",
       "        ('买卖标志', String),\n",
       "        ('业务名称', String),\n",
       "        ('成交时间', String),\n",
       "        ('成交数量', String),\n",
       "        ('成交价格', String),\n",
       "        ('成交金额', String),\n",
       "        ('发生金额', String),\n",
       "        ('手续费', String),\n",
       "        ('印花税', String),\n",
       "        ('过户费', String),\n",
       "        ('其他费', String),\n",
       "        ('备注', String),\n",
       "        ('币种', String)])"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pl.read_csv(\n",
    "    \"stock_trades/202207-湘财.xls\",\n",
    "    encoding=\"gb18030\",\n",
    "    separator=\"\\t\",\n",
    "    infer_schema=False,\n",
    ")\n",
    "df = df.with_columns(\n",
    "    pl.col(\"发生日期\").str.to_date(\"%Y%m%d\"),\n",
    ")\n",
    "df.schema"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "a80faf9b-d55f-4c22-9750-254ebcea730e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>foo</th><th>foo2</th></tr><tr><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;food&quot;</td><td>&quot;ood&quot;</td></tr><tr><td>&quot;meeteeemmemem&quot;</td><td>&quot;t&quot;</td></tr><tr><td>&quot;vegetablf&quot;</td><td>&quot;vegetabl&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (3, 2)\n",
       "┌───────────────┬──────────┐\n",
       "│ foo           ┆ foo2     │\n",
       "│ ---           ┆ ---      │\n",
       "│ str           ┆ str      │\n",
       "╞═══════════════╪══════════╡\n",
       "│ food          ┆ ood      │\n",
       "│ meeteeemmemem ┆ t        │\n",
       "│ vegetablf     ┆ vegetabl │\n",
       "└───────────────┴──────────┘"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pl.DataFrame(\n",
    "    {\n",
    "        \"foo\": [\"food\", \"meeteeemmemem\", \"vegetablf\"],\n",
    "    }\n",
    ")\n",
    "df\n",
    "df.with_columns(foo2=pl.col(\"foo\").str.strip_chars(\"fme\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "6500241a-c08e-42f7-a9a6-0993e7719208",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>foo</th><th>foo2</th></tr><tr><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;food&quot;</td><td>&quot;food&quot;</td></tr><tr><td>&quot;meeteeemmemem&quot;</td><td>&quot;eteeemmemem&quot;</td></tr><tr><td>&quot;vegetablf&quot;</td><td>&quot;vegetablf&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (3, 2)\n",
       "┌───────────────┬─────────────┐\n",
       "│ foo           ┆ foo2        │\n",
       "│ ---           ┆ ---         │\n",
       "│ str           ┆ str         │\n",
       "╞═══════════════╪═════════════╡\n",
       "│ food          ┆ food        │\n",
       "│ meeteeemmemem ┆ eteeemmemem │\n",
       "│ vegetablf     ┆ vegetablf   │\n",
       "└───────────────┴─────────────┘"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pl.DataFrame(\n",
    "    {\n",
    "        \"foo\": [\"food\", \"meeteeemmemem\", \"vegetablf\"],\n",
    "    }\n",
    ")\n",
    "df\n",
    "df.with_columns(foo2=pl.col(\"foo\").str.strip_prefix(\"me\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "id": "0a139afa-d6d7-4334-a723-51bbf46a7890",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "id": "b341cbbb-cd13-40df-96c0-4ddec4e9f3b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "def read_df_湘财(f: str | Path) -> pl.DataFrame:\n",
    "    df = pl.read_csv(\n",
    "        f,\n",
    "        encoding=\"gb18030\",\n",
    "        separator=\"\\t\",\n",
    "        infer_schema=False,\n",
    "    )\n",
    "    df = df.with_columns(\n",
    "        pl.selectors.all().str.strip_prefix(\"=\").str.strip_chars('\"'),\n",
    "    ).with_columns(\n",
    "        pl.col(\"发生日期\").str.to_date(\"%Y%m%d\"),\n",
    "        pl.col(\"成交时间\").str.to_time(),\n",
    "        pl.col(\n",
    "            \"成交数量\",\n",
    "            \"成交价格\",\n",
    "            \"成交金额\",\n",
    "            \"发生金额\",\n",
    "            \"手续费\",\n",
    "            \"印花税\",\n",
    "            \"过户费\",\n",
    "            \"其他费\",\n",
    "        ).cast(pl.Float64),\n",
    "    )\n",
    "    df = df.filter(\n",
    "        pl.col(\"业务名称\").is_in([\"证券买入\", \"证券卖出\"]),\n",
    "    )\n",
    "    return df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "908c90bb-418f-43c7-a7ed-4a490f8b4d6b",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = [read_df_湘财(f) for f in Path(\"stock_trades/\").glob(\"*-湘财.xls\")]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "e09cdac7-2a06-4bff-acbc-b115ac672501",
   "metadata": {},
   "outputs": [],
   "source": [
    "d1 = pl.concat(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "6d4b86d2-375a-41c4-8b53-899d53afe69c",
   "metadata": {},
   "outputs": [],
   "source": [
    "d1 = d1.with_columns(\n",
    "    券商=pl.lit(\"湘财\"),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "7d6b4f82-1aa5-45bd-82f9-246329bea7e0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (257, 17)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th><th>券商</th></tr><tr><td>date</td><td>str</td><td>str</td><td>str</td><td>str</td><td>time</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>2022-07-18</td><td>&quot;002462&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>09:38:10</td><td>-10400.0</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>21.98</td><td>137.35</td><td>1.38</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:44:52</td><td>47000.0</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>23.99</td><td>0.0</td><td>1.51</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:44:31</td><td>11900.0</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>24.0</td><td>0.0</td><td>1.49</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:43:38</td><td>40700.0</td><td>3.69</td><td>150183.0</td><td>-150208.53</td><td>24.03</td><td>0.0</td><td>1.5</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600015&quot;</td><td>&quot;华夏银行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:42:51</td><td>30000.0</td><td>5.07</td><td>152100.0</td><td>-152125.86</td><td>24.34</td><td>0.0</td><td>1.52</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>2023-06-19</td><td>&quot;603967&quot;</td><td>&quot;中创物流&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>10:18:46</td><td>-5000.0</td><td>9.13</td><td>45650.0</td><td>45596.59</td><td>7.3</td><td>45.65</td><td>0.46</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-06-12</td><td>&quot;300641&quot;</td><td>&quot;正丹股份&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>13:22:32</td><td>-9600.0</td><td>5.05</td><td>48480.0</td><td>48423.76</td><td>7.76</td><td>48.48</td><td>0.48</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-06-02</td><td>&quot;000655&quot;</td><td>&quot;金岭矿业&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>10:26:35</td><td>-7500.0</td><td>6.48</td><td>48600.0</td><td>48543.61</td><td>7.78</td><td>48.61</td><td>0.47</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-06-01</td><td>&quot;300214&quot;</td><td>&quot;日科化学&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>10:45:35</td><td>-7400.0</td><td>6.8</td><td>50320.0</td><td>50261.63</td><td>8.05</td><td>50.32</td><td>0.51</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-09-11</td><td>&quot;603577&quot;</td><td>&quot;汇金通&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>09:46:10</td><td>-5100.0</td><td>9.3024</td><td>47442.0</td><td>47410.89</td><td>6.9</td><td>23.72</td><td>0.49</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (257, 17)\n",
       "┌────────────┬──────────┬──────────┬──────────┬───┬────────┬──────────┬────────┬──────┐\n",
       "│ 发生日期   ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 其他费 ┆ 备注     ┆ 币种   ┆ 券商 │\n",
       "│ ---        ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---      ┆ ---    ┆ ---  │\n",
       "│ date       ┆ str      ┆ str      ┆ str      ┆   ┆ f64    ┆ str      ┆ str    ┆ str  │\n",
       "╞════════════╪══════════╪══════════╪══════════╪═══╪════════╪══════════╪════════╪══════╡\n",
       "│ 2022-07-18 ┆ 002462   ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600269   ┆ 赣粤高速 ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600015   ┆ 华夏银行 ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ …          ┆ …        ┆ …        ┆ …        ┆ … ┆ …      ┆ …        ┆ …      ┆ …    │\n",
       "│ 2023-06-19 ┆ 603967   ┆ 中创物流 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-06-12 ┆ 300641   ┆ 正丹股份 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-06-02 ┆ 000655   ┆ 金岭矿业 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-06-01 ┆ 300214   ┆ 日科化学 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-09-11 ┆ 603577   ┆ 汇金通   ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "└────────────┴──────────┴──────────┴──────────┴───┴────────┴──────────┴────────┴──────┘"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "c51d6181-7c77-4c8f-afbc-01ab7eb9d055",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pl.read_excel(\"stock_trades/202305-海通普通.xlsx\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "ca06d5e8-b58a-4567-9544-aab5e5fbec33",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rows: 10\n",
      "Columns: 14\n",
      "$ 证券代码 <str> '300107', '131810', '799999', '600626', '600178', '603002', '131810', '300107', '002224', '799998'\n",
      "$ 证券名称 <str> '建新股份', 'Ｒ-001', '指定登记', '申达股份', '东安动力', '宏昌电子', 'Ｒ-001', '建新股份', '三 力 士', '指定撤销'\n",
      "$ 成交日期 <i64> 20230529, 20230524, 20230524, 20230524, 20230524, 20230524, 20230523, 20230523, 20230523, 20230522\n",
      "$ 成交时间 <str> '', '', '15:00:00', '10:06:14', '09:59:17', '09:54:48', '10:05:49', '10:01:57', '09:58:07', '15:00:00'\n",
      "$ 成交数量 <i64> 0, 1500, 0, 14800, 16400, 9800, 1500, 10000, 10800, 0\n",
      "$ 成交价格 <f64> 0.0, 100.005, 0.0, 3.37, 6.07, 5.06, 1.865, 5.0, 4.59, 0.0\n",
      "$ 成交金额 <f64> 600.0, 150007.66, 0.0, 49876.0, 99548.0, 49588.0, 150000.0, 50000.0, 49572.0, 0.0\n",
      "$ 发生金额 <f64> 600.0, 150007.66, 0.0, -49881.48, -99558.97, -49593.46, -150001.5, -50005.0, -49576.96, 0.0\n",
      "$ 操作   <str> '卖', '买', '指', '买', '买', '买', '卖', '买', '买', '撤'\n",
      "$ 手续费  <f64> 0.0, 0.0, 0.0, 4.99, 9.95, 4.96, 1.5, 5.0, 4.96, 0.0\n",
      "$ 印花税  <i64> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n",
      "$ 过户费  <f64> 0.0, 0.0, 0.0, 0.49, 1.02, 0.5, 0.0, 0.0, 0.0, 0.0\n",
      "$ 其他费  <i64> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n",
      "$ 备注   <str> '建新股份,深圳现金红利', 'Ｒ-001,拆出购回', '指定登记指定交易', '申达股份证券买入', '东安动力证券买入', '宏昌电子证券买入', '到期日[20230524]，利息[7.66]，金额[150007.66]', '建新股份证券买入', '三 力 士证券买入', '指定撤销撤消指定'\n",
      "\n"
     ]
    }
   ],
   "source": [
    "df.glimpse()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b5497a50-4e81-4b8a-80ad-b75505a40054",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "c191a2e6-f6e2-4b4b-87a9-f478249f505c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[WindowsPath('stock_trades/202305-海通普通.xlsx'),\n",
       " WindowsPath('stock_trades/202306-海通普通.xlsx'),\n",
       " WindowsPath('stock_trades/202307-海通普通.xlsx')]"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(Path(\"stock_trades/\").glob(\"*-海通普通.xlsx\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "id": "2d756674-2486-4644-bd3b-0c6052333602",
   "metadata": {},
   "outputs": [],
   "source": [
    "def read_df_海通普通(f: str | Path) -> pl.DataFrame:\n",
    "    df = pl.read_excel(\n",
    "        f,\n",
    "        schema_overrides={\n",
    "            \"成交日期\": pl.String,\n",
    "            \"成交时间\": pl.String,\n",
    "            \"成交数量\": pl.Float64,\n",
    "            \"成交金额\": pl.Float64,\n",
    "            \"印花税\": pl.Float64,\n",
    "            \"其他费\": pl.Float64,\n",
    "        },\n",
    "    )\n",
    "    df = df.filter(\n",
    "        (pl.col(\"成交时间\") != \"\")\n",
    "        & (pl.col(\"操作\").is_in([\"买\", \"卖\"]))\n",
    "        & (~pl.col(\"证券代码\").str.starts_with(\"1318\"))\n",
    "        & (~pl.col(\"证券代码\").str.starts_with(\"204\"))\n",
    "    ).with_columns(\n",
    "        pl.col(\"成交日期\").str.to_date(\"%Y%m%d\"),\n",
    "        pl.col(\"成交时间\").str.to_time(),\n",
    "    )\n",
    "    return df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "c224f042-b61b-48cc-aa00-9e883251b99c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (53, 15)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券代码</th><th>证券名称</th><th>成交日期</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>操作</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>券商</th></tr><tr><td>str</td><td>str</td><td>date</td><td>time</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;600626&quot;</td><td>&quot;申达股份&quot;</td><td>2023-05-24</td><td>10:06:14</td><td>14800.0</td><td>3.37</td><td>49876.0</td><td>-49881.48</td><td>&quot;买&quot;</td><td>4.99</td><td>0.0</td><td>0.49</td><td>0.0</td><td>&quot;申达股份证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;600178&quot;</td><td>&quot;东安动力&quot;</td><td>2023-05-24</td><td>09:59:17</td><td>16400.0</td><td>6.07</td><td>99548.0</td><td>-99558.97</td><td>&quot;买&quot;</td><td>9.95</td><td>0.0</td><td>1.02</td><td>0.0</td><td>&quot;东安动力证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;603002&quot;</td><td>&quot;宏昌电子&quot;</td><td>2023-05-24</td><td>09:54:48</td><td>9800.0</td><td>5.06</td><td>49588.0</td><td>-49593.46</td><td>&quot;买&quot;</td><td>4.96</td><td>0.0</td><td>0.5</td><td>0.0</td><td>&quot;宏昌电子证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;300107&quot;</td><td>&quot;建新股份&quot;</td><td>2023-05-23</td><td>10:01:57</td><td>10000.0</td><td>5.0</td><td>50000.0</td><td>-50005.0</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;建新股份证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;002224&quot;</td><td>&quot;三 力 士&quot;</td><td>2023-05-23</td><td>09:58:07</td><td>10800.0</td><td>4.59</td><td>49572.0</td><td>-49576.96</td><td>&quot;买&quot;</td><td>4.96</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;三 力 士证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;605196&quot;</td><td>&quot;华通线缆&quot;</td><td>2023-07-17</td><td>10:03:09</td><td>7200.0</td><td>7.81</td><td>56232.0</td><td>56169.59</td><td>&quot;卖&quot;</td><td>5.62</td><td>56.23</td><td>0.56</td><td>0.0</td><td>&quot;华通线缆证券卖出&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;002842&quot;</td><td>&quot;翔鹭钨业&quot;</td><td>2023-07-11</td><td>10:04:39</td><td>5900.0</td><td>8.68</td><td>51212.0</td><td>51155.66</td><td>&quot;卖&quot;</td><td>5.12</td><td>51.22</td><td>0.0</td><td>0.0</td><td>&quot;翔鹭钨业证券卖出&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;002331&quot;</td><td>&quot;皖通科技&quot;</td><td>2023-07-11</td><td>10:03:52</td><td>6900.0</td><td>7.33</td><td>50577.0</td><td>50521.36</td><td>&quot;卖&quot;</td><td>5.06</td><td>50.58</td><td>0.0</td><td>0.0</td><td>&quot;皖通科技证券卖出&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;600300&quot;</td><td>&quot;维维股份&quot;</td><td>2023-07-11</td><td>10:13:04</td><td>16400.0</td><td>3.05</td><td>50020.0</td><td>-50025.5</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.5</td><td>0.0</td><td>&quot;维维股份证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;600287&quot;</td><td>&quot;江苏舜天&quot;</td><td>2023-07-11</td><td>10:08:50</td><td>9900.0</td><td>5.06</td><td>50094.0</td><td>-50099.51</td><td>&quot;买&quot;</td><td>5.01</td><td>0.0</td><td>0.5</td><td>0.0</td><td>&quot;江苏舜天证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (53, 15)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬────────┬──────────┬─────────┐\n",
       "│ 证券代码 ┆ 证券名称 ┆ 成交日期 ┆ 成交时间 ┆ … ┆ 过户费 ┆ 其他费 ┆ 备注     ┆ 券商    │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---    ┆ ---      ┆ ---     │\n",
       "│ str      ┆ str      ┆ date     ┆ time     ┆   ┆ f64    ┆ f64    ┆ str      ┆ str     │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪════════╪══════════╪═════════╡\n",
       "│ 600626   ┆ 申达股份 ┆ 2023-05- ┆ 10:06:14 ┆ … ┆ 0.49   ┆ 0.0    ┆ 申达股份 ┆ 海通普  │\n",
       "│          ┆          ┆ 24       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 600178   ┆ 东安动力 ┆ 2023-05- ┆ 09:59:17 ┆ … ┆ 1.02   ┆ 0.0    ┆ 东安动力 ┆ 海通普  │\n",
       "│          ┆          ┆ 24       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 603002   ┆ 宏昌电子 ┆ 2023-05- ┆ 09:54:48 ┆ … ┆ 0.5    ┆ 0.0    ┆ 宏昌电子 ┆ 海通普  │\n",
       "│          ┆          ┆ 24       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 300107   ┆ 建新股份 ┆ 2023-05- ┆ 10:01:57 ┆ … ┆ 0.0    ┆ 0.0    ┆ 建新股份 ┆ 海通普  │\n",
       "│          ┆          ┆ 23       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 002224   ┆ 三 力 士 ┆ 2023-05- ┆ 09:58:07 ┆ … ┆ 0.0    ┆ 0.0    ┆ 三 力    ┆ 海通普  │\n",
       "│          ┆          ┆ 23       ┆          ┆   ┆        ┆        ┆ 士证券买 ┆ 通      │\n",
       "│          ┆          ┆          ┆          ┆   ┆        ┆        ┆ 入       ┆         │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …      ┆ …      ┆ …        ┆ …       │\n",
       "│ 605196   ┆ 华通线缆 ┆ 2023-07- ┆ 10:03:09 ┆ … ┆ 0.56   ┆ 0.0    ┆ 华通线缆 ┆ 海通普  │\n",
       "│          ┆          ┆ 17       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 通      │\n",
       "│ 002842   ┆ 翔鹭钨业 ┆ 2023-07- ┆ 10:04:39 ┆ … ┆ 0.0    ┆ 0.0    ┆ 翔鹭钨业 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 通      │\n",
       "│ 002331   ┆ 皖通科技 ┆ 2023-07- ┆ 10:03:52 ┆ … ┆ 0.0    ┆ 0.0    ┆ 皖通科技 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 通      │\n",
       "│ 600300   ┆ 维维股份 ┆ 2023-07- ┆ 10:13:04 ┆ … ┆ 0.5    ┆ 0.0    ┆ 维维股份 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 600287   ┆ 江苏舜天 ┆ 2023-07- ┆ 10:08:50 ┆ … ┆ 0.5    ┆ 0.0    ┆ 江苏舜天 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴────────┴──────────┴─────────┘"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = [read_df_海通普通(p) for p in Path(\"stock_trades/\").glob(\"*-海通普通.xlsx\")]\n",
    "df = pl.concat(df)\n",
    "d2 = df.with_columns(\n",
    "    券商=pl.lit(\"海通普通\"),\n",
    ")\n",
    "d2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "id": "56e4c292-7ba5-4fec-8bde-13d91039b685",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (53, 15)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券代码</th><th>证券名称</th><th>成交日期</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>操作</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>券商</th></tr><tr><td>str</td><td>str</td><td>date</td><td>time</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;600638&quot;</td><td>&quot;新黄浦&quot;</td><td>2023-07-26</td><td>09:33:56</td><td>9300.0</td><td>6.526</td><td>60696.0</td><td>60628.01</td><td>&quot;卖&quot;</td><td>6.68</td><td>60.7</td><td>0.61</td><td>0.0</td><td>&quot;新黄浦证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002492&quot;</td><td>&quot;恒基达鑫&quot;</td><td>2023-07-27</td><td>09:30:42</td><td>8700.0</td><td>6.12</td><td>53244.0</td><td>53184.91</td><td>&quot;卖&quot;</td><td>5.86</td><td>53.23</td><td>0.0</td><td>0.0</td><td>&quot;恒基达鑫证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002136&quot;</td><td>&quot;安 纳 达&quot;</td><td>2023-07-27</td><td>09:32:52</td><td>4400.0</td><td>11.881</td><td>52277.0</td><td>52218.97</td><td>&quot;卖&quot;</td><td>5.75</td><td>52.28</td><td>0.0</td><td>0.0</td><td>&quot;安 纳 达证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;600300&quot;</td><td>&quot;维维股份&quot;</td><td>2023-08-04</td><td>09:36:55</td><td>16400.0</td><td>3.27</td><td>53628.0</td><td>53567.91</td><td>&quot;卖&quot;</td><td>5.9</td><td>53.65</td><td>0.54</td><td>0.0</td><td>&quot;维维股份证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;300241&quot;</td><td>&quot;瑞丰光电&quot;</td><td>2023-08-04</td><td>09:39:38</td><td>9700.0</td><td>5.13</td><td>49761.0</td><td>-49766.47</td><td>&quot;买&quot;</td><td>5.47</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;瑞丰光电证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;002956&quot;</td><td>&quot;西麦食品&quot;</td><td>2023-10-31</td><td>09:31:53</td><td>5000.0</td><td>14.13</td><td>70650.0</td><td>70607.91</td><td>&quot;卖&quot;</td><td>6.74</td><td>35.35</td><td>0.0</td><td>0.0</td><td>&quot;西麦食品证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;603214&quot;</td><td>&quot;爱婴室&quot;</td><td>2023-10-31</td><td>09:39:57</td><td>3100.0</td><td>15.84</td><td>49104.0</td><td>-49109.51</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.51</td><td>0.0</td><td>&quot;爱婴室证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;300132&quot;</td><td>&quot;青松股份&quot;</td><td>2023-10-31</td><td>09:40:55</td><td>9600.0</td><td>5.21</td><td>50016.0</td><td>-50021.0</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;青松股份证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002492&quot;</td><td>&quot;恒基达鑫&quot;</td><td>2023-10-31</td><td>09:43:13</td><td>8400.0</td><td>5.91</td><td>49644.0</td><td>-49649.0</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;恒基达鑫证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002111&quot;</td><td>&quot;威海广泰&quot;</td><td>2023-10-31</td><td>09:44:45</td><td>5400.0</td><td>9.24</td><td>49896.0</td><td>-49901.0</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;威海广泰证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (53, 15)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬────────┬──────────┬─────────┐\n",
       "│ 证券代码 ┆ 证券名称 ┆ 成交日期 ┆ 成交时间 ┆ … ┆ 过户费 ┆ 其他费 ┆ 备注     ┆ 券商    │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---    ┆ ---      ┆ ---     │\n",
       "│ str      ┆ str      ┆ date     ┆ time     ┆   ┆ f64    ┆ f64    ┆ str      ┆ str     │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪════════╪══════════╪═════════╡\n",
       "│ 600638   ┆ 新黄浦   ┆ 2023-07- ┆ 09:33:56 ┆ … ┆ 0.61   ┆ 0.0    ┆ 新黄浦证 ┆ 海通两  │\n",
       "│          ┆          ┆ 26       ┆          ┆   ┆        ┆        ┆ 券卖出   ┆ 融      │\n",
       "│ 002492   ┆ 恒基达鑫 ┆ 2023-07- ┆ 09:30:42 ┆ … ┆ 0.0    ┆ 0.0    ┆ 恒基达鑫 ┆ 海通两  │\n",
       "│          ┆          ┆ 27       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 002136   ┆ 安 纳 达 ┆ 2023-07- ┆ 09:32:52 ┆ … ┆ 0.0    ┆ 0.0    ┆ 安 纳    ┆ 海通两  │\n",
       "│          ┆          ┆ 27       ┆          ┆   ┆        ┆        ┆ 达证券卖 ┆ 融      │\n",
       "│          ┆          ┆          ┆          ┆   ┆        ┆        ┆ 出       ┆         │\n",
       "│ 600300   ┆ 维维股份 ┆ 2023-08- ┆ 09:36:55 ┆ … ┆ 0.54   ┆ 0.0    ┆ 维维股份 ┆ 海通两  │\n",
       "│          ┆          ┆ 04       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 300241   ┆ 瑞丰光电 ┆ 2023-08- ┆ 09:39:38 ┆ … ┆ 0.0    ┆ 0.0    ┆ 瑞丰光电 ┆ 海通两  │\n",
       "│          ┆          ┆ 04       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …      ┆ …      ┆ …        ┆ …       │\n",
       "│ 002956   ┆ 西麦食品 ┆ 2023-10- ┆ 09:31:53 ┆ … ┆ 0.0    ┆ 0.0    ┆ 西麦食品 ┆ 海通两  │\n",
       "│          ┆          ┆ 31       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 603214   ┆ 爱婴室   ┆ 2023-10- ┆ 09:39:57 ┆ … ┆ 0.51   ┆ 0.0    ┆ 爱婴室证 ┆ 海通两  │\n",
       "│          ┆          ┆ 31       ┆          ┆   ┆        ┆        ┆ 券买入   ┆ 融      │\n",
       "│ 300132   ┆ 青松股份 ┆ 2023-10- ┆ 09:40:55 ┆ … ┆ 0.0    ┆ 0.0    ┆ 青松股份 ┆ 海通两  │\n",
       "│          ┆          ┆ 31       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "│ 002492   ┆ 恒基达鑫 ┆ 2023-10- ┆ 09:43:13 ┆ … ┆ 0.0    ┆ 0.0    ┆ 恒基达鑫 ┆ 海通两  │\n",
       "│          ┆          ┆ 31       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "│ 002111   ┆ 威海广泰 ┆ 2023-10- ┆ 09:44:45 ┆ … ┆ 0.0    ┆ 0.0    ┆ 威海广泰 ┆ 海通两  │\n",
       "│          ┆          ┆ 31       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴────────┴──────────┴─────────┘"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = [read_df_海通普通(p) for p in Path(\"stock_trades/\").glob(\"*-海通两融.xlsx\")]\n",
    "df = pl.concat(df)\n",
    "d3 = df.with_columns(\n",
    "    券商=pl.lit(\"海通两融\"),\n",
    ")\n",
    "d3.sort(\"成交日期\", \"成交时间\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "63e7b311-7848-497a-b0c3-900e3feae36b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (257, 17)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>发生日期</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>业务名称</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>币种</th><th>券商</th></tr><tr><td>date</td><td>str</td><td>str</td><td>str</td><td>str</td><td>time</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>2022-07-18</td><td>&quot;002462&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>09:38:10</td><td>-10400.0</td><td>13.2062</td><td>137344.0</td><td>137184.67</td><td>21.98</td><td>137.35</td><td>1.38</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:44:52</td><td>47000.0</td><td>3.19</td><td>149930.0</td><td>-149955.5</td><td>23.99</td><td>0.0</td><td>1.51</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:44:31</td><td>11900.0</td><td>12.6066</td><td>150019.0</td><td>-150044.49</td><td>24.0</td><td>0.0</td><td>1.49</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:43:38</td><td>40700.0</td><td>3.69</td><td>150183.0</td><td>-150208.53</td><td>24.03</td><td>0.0</td><td>1.5</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2022-07-18</td><td>&quot;600015&quot;</td><td>&quot;华夏银行&quot;</td><td>&quot;买入&quot;</td><td>&quot;证券买入&quot;</td><td>09:42:51</td><td>30000.0</td><td>5.07</td><td>152100.0</td><td>-152125.86</td><td>24.34</td><td>0.0</td><td>1.52</td><td>0.0</td><td>&quot;证券买入&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>2023-06-19</td><td>&quot;603967&quot;</td><td>&quot;中创物流&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>10:18:46</td><td>-5000.0</td><td>9.13</td><td>45650.0</td><td>45596.59</td><td>7.3</td><td>45.65</td><td>0.46</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-06-12</td><td>&quot;300641&quot;</td><td>&quot;正丹股份&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>13:22:32</td><td>-9600.0</td><td>5.05</td><td>48480.0</td><td>48423.76</td><td>7.76</td><td>48.48</td><td>0.48</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-06-02</td><td>&quot;000655&quot;</td><td>&quot;金岭矿业&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>10:26:35</td><td>-7500.0</td><td>6.48</td><td>48600.0</td><td>48543.61</td><td>7.78</td><td>48.61</td><td>0.47</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-06-01</td><td>&quot;300214&quot;</td><td>&quot;日科化学&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>10:45:35</td><td>-7400.0</td><td>6.8</td><td>50320.0</td><td>50261.63</td><td>8.05</td><td>50.32</td><td>0.51</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr><tr><td>2023-09-11</td><td>&quot;603577&quot;</td><td>&quot;汇金通&quot;</td><td>&quot;卖出&quot;</td><td>&quot;证券卖出&quot;</td><td>09:46:10</td><td>-5100.0</td><td>9.3024</td><td>47442.0</td><td>47410.89</td><td>6.9</td><td>23.72</td><td>0.49</td><td>0.0</td><td>&quot;证券卖出&quot;</td><td>&quot;人民币&quot;</td><td>&quot;湘财&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (257, 17)\n",
       "┌────────────┬──────────┬──────────┬──────────┬───┬────────┬──────────┬────────┬──────┐\n",
       "│ 发生日期   ┆ 证券代码 ┆ 证券名称 ┆ 买卖标志 ┆ … ┆ 其他费 ┆ 备注     ┆ 币种   ┆ 券商 │\n",
       "│ ---        ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---      ┆ ---    ┆ ---  │\n",
       "│ date       ┆ str      ┆ str      ┆ str      ┆   ┆ f64    ┆ str      ┆ str    ┆ str  │\n",
       "╞════════════╪══════════╪══════════╪══════════╪═══╪════════╪══════════╪════════╪══════╡\n",
       "│ 2022-07-18 ┆ 002462   ┆ 嘉事堂   ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600408   ┆ 安泰集团 ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600648   ┆ 外高桥   ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600269   ┆ 赣粤高速 ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2022-07-18 ┆ 600015   ┆ 华夏银行 ┆ 买入     ┆ … ┆ 0.0    ┆ 证券买入 ┆ 人民币 ┆ 湘财 │\n",
       "│ …          ┆ …        ┆ …        ┆ …        ┆ … ┆ …      ┆ …        ┆ …      ┆ …    │\n",
       "│ 2023-06-19 ┆ 603967   ┆ 中创物流 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-06-12 ┆ 300641   ┆ 正丹股份 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-06-02 ┆ 000655   ┆ 金岭矿业 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-06-01 ┆ 300214   ┆ 日科化学 ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "│ 2023-09-11 ┆ 603577   ┆ 汇金通   ┆ 卖出     ┆ … ┆ 0.0    ┆ 证券卖出 ┆ 人民币 ┆ 湘财 │\n",
       "└────────────┴──────────┴──────────┴──────────┴───┴────────┴──────────┴────────┴──────┘"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "2ea061fb-b9f1-4ce5-af9e-ac3f009f13a9",
   "metadata": {},
   "outputs": [],
   "source": [
    "d1 = d1.select(\n",
    "    券商=pl.col(\"券商\"),\n",
    "    交易日期=pl.col(\"发生日期\"),\n",
    "    交易时间=pl.col(\"成交时间\"),\n",
    "    证券代码=pl.col(\"证券代码\"),\n",
    "    证券名称=pl.col(\"证券名称\"),\n",
    "    买卖标志=pl.col(\"买卖标志\"),\n",
    "    成交价格=pl.col(\"成交价格\"),\n",
    "    成交数量=pl.col(\"成交数量\").abs(),\n",
    "    成交金额=pl.col(\"成交金额\"),\n",
    "    手续费=pl.col(\"手续费\"),\n",
    "    印花税=pl.col(\"印花税\"),\n",
    "    过户费=pl.col(\"过户费\"),\n",
    "    其他费=pl.col(\"其他费\"),\n",
    "    发生金额=pl.col(\"发生金额\"),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "id": "b6753f68-84a4-438f-bade-3bd7c0b2f7e2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (53, 15)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券代码</th><th>证券名称</th><th>成交日期</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>操作</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>券商</th></tr><tr><td>str</td><td>str</td><td>date</td><td>time</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;600626&quot;</td><td>&quot;申达股份&quot;</td><td>2023-05-24</td><td>10:06:14</td><td>14800.0</td><td>3.37</td><td>49876.0</td><td>-49881.48</td><td>&quot;买&quot;</td><td>4.99</td><td>0.0</td><td>0.49</td><td>0.0</td><td>&quot;申达股份证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;600178&quot;</td><td>&quot;东安动力&quot;</td><td>2023-05-24</td><td>09:59:17</td><td>16400.0</td><td>6.07</td><td>99548.0</td><td>-99558.97</td><td>&quot;买&quot;</td><td>9.95</td><td>0.0</td><td>1.02</td><td>0.0</td><td>&quot;东安动力证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;603002&quot;</td><td>&quot;宏昌电子&quot;</td><td>2023-05-24</td><td>09:54:48</td><td>9800.0</td><td>5.06</td><td>49588.0</td><td>-49593.46</td><td>&quot;买&quot;</td><td>4.96</td><td>0.0</td><td>0.5</td><td>0.0</td><td>&quot;宏昌电子证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;300107&quot;</td><td>&quot;建新股份&quot;</td><td>2023-05-23</td><td>10:01:57</td><td>10000.0</td><td>5.0</td><td>50000.0</td><td>-50005.0</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;建新股份证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;002224&quot;</td><td>&quot;三 力 士&quot;</td><td>2023-05-23</td><td>09:58:07</td><td>10800.0</td><td>4.59</td><td>49572.0</td><td>-49576.96</td><td>&quot;买&quot;</td><td>4.96</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;三 力 士证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;605196&quot;</td><td>&quot;华通线缆&quot;</td><td>2023-07-17</td><td>10:03:09</td><td>7200.0</td><td>7.81</td><td>56232.0</td><td>56169.59</td><td>&quot;卖&quot;</td><td>5.62</td><td>56.23</td><td>0.56</td><td>0.0</td><td>&quot;华通线缆证券卖出&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;002842&quot;</td><td>&quot;翔鹭钨业&quot;</td><td>2023-07-11</td><td>10:04:39</td><td>5900.0</td><td>8.68</td><td>51212.0</td><td>51155.66</td><td>&quot;卖&quot;</td><td>5.12</td><td>51.22</td><td>0.0</td><td>0.0</td><td>&quot;翔鹭钨业证券卖出&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;002331&quot;</td><td>&quot;皖通科技&quot;</td><td>2023-07-11</td><td>10:03:52</td><td>6900.0</td><td>7.33</td><td>50577.0</td><td>50521.36</td><td>&quot;卖&quot;</td><td>5.06</td><td>50.58</td><td>0.0</td><td>0.0</td><td>&quot;皖通科技证券卖出&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;600300&quot;</td><td>&quot;维维股份&quot;</td><td>2023-07-11</td><td>10:13:04</td><td>16400.0</td><td>3.05</td><td>50020.0</td><td>-50025.5</td><td>&quot;买&quot;</td><td>5.0</td><td>0.0</td><td>0.5</td><td>0.0</td><td>&quot;维维股份证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr><tr><td>&quot;600287&quot;</td><td>&quot;江苏舜天&quot;</td><td>2023-07-11</td><td>10:08:50</td><td>9900.0</td><td>5.06</td><td>50094.0</td><td>-50099.51</td><td>&quot;买&quot;</td><td>5.01</td><td>0.0</td><td>0.5</td><td>0.0</td><td>&quot;江苏舜天证券买入&quot;</td><td>&quot;海通普通&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (53, 15)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬────────┬──────────┬─────────┐\n",
       "│ 证券代码 ┆ 证券名称 ┆ 成交日期 ┆ 成交时间 ┆ … ┆ 过户费 ┆ 其他费 ┆ 备注     ┆ 券商    │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---    ┆ ---      ┆ ---     │\n",
       "│ str      ┆ str      ┆ date     ┆ time     ┆   ┆ f64    ┆ f64    ┆ str      ┆ str     │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪════════╪══════════╪═════════╡\n",
       "│ 600626   ┆ 申达股份 ┆ 2023-05- ┆ 10:06:14 ┆ … ┆ 0.49   ┆ 0.0    ┆ 申达股份 ┆ 海通普  │\n",
       "│          ┆          ┆ 24       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 600178   ┆ 东安动力 ┆ 2023-05- ┆ 09:59:17 ┆ … ┆ 1.02   ┆ 0.0    ┆ 东安动力 ┆ 海通普  │\n",
       "│          ┆          ┆ 24       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 603002   ┆ 宏昌电子 ┆ 2023-05- ┆ 09:54:48 ┆ … ┆ 0.5    ┆ 0.0    ┆ 宏昌电子 ┆ 海通普  │\n",
       "│          ┆          ┆ 24       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 300107   ┆ 建新股份 ┆ 2023-05- ┆ 10:01:57 ┆ … ┆ 0.0    ┆ 0.0    ┆ 建新股份 ┆ 海通普  │\n",
       "│          ┆          ┆ 23       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 002224   ┆ 三 力 士 ┆ 2023-05- ┆ 09:58:07 ┆ … ┆ 0.0    ┆ 0.0    ┆ 三 力    ┆ 海通普  │\n",
       "│          ┆          ┆ 23       ┆          ┆   ┆        ┆        ┆ 士证券买 ┆ 通      │\n",
       "│          ┆          ┆          ┆          ┆   ┆        ┆        ┆ 入       ┆         │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …      ┆ …      ┆ …        ┆ …       │\n",
       "│ 605196   ┆ 华通线缆 ┆ 2023-07- ┆ 10:03:09 ┆ … ┆ 0.56   ┆ 0.0    ┆ 华通线缆 ┆ 海通普  │\n",
       "│          ┆          ┆ 17       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 通      │\n",
       "│ 002842   ┆ 翔鹭钨业 ┆ 2023-07- ┆ 10:04:39 ┆ … ┆ 0.0    ┆ 0.0    ┆ 翔鹭钨业 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 通      │\n",
       "│ 002331   ┆ 皖通科技 ┆ 2023-07- ┆ 10:03:52 ┆ … ┆ 0.0    ┆ 0.0    ┆ 皖通科技 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 通      │\n",
       "│ 600300   ┆ 维维股份 ┆ 2023-07- ┆ 10:13:04 ┆ … ┆ 0.5    ┆ 0.0    ┆ 维维股份 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "│ 600287   ┆ 江苏舜天 ┆ 2023-07- ┆ 10:08:50 ┆ … ┆ 0.5    ┆ 0.0    ┆ 江苏舜天 ┆ 海通普  │\n",
       "│          ┆          ┆ 11       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 通      │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴────────┴──────────┴─────────┘"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "0febbcf1-8e3d-4752-95af-0391f88321cf",
   "metadata": {},
   "outputs": [],
   "source": [
    "d2 = d2.select(\n",
    "    券商=pl.col(\"券商\"),\n",
    "    交易日期=pl.col(\"成交日期\"),\n",
    "    交易时间=pl.col(\"成交时间\"),\n",
    "    证券代码=pl.col(\"证券代码\"),\n",
    "    证券名称=pl.col(\"证券名称\"),\n",
    "    买卖标志=pl.col(\"操作\").replace({\"卖\": \"卖出\", \"买\": \"买入\"}),\n",
    "    成交价格=pl.col(\"成交价格\"),\n",
    "    成交数量=pl.col(\"成交数量\").abs(),\n",
    "    成交金额=pl.col(\"成交金额\"),\n",
    "    手续费=pl.col(\"手续费\"),\n",
    "    印花税=pl.col(\"印花税\"),\n",
    "    过户费=pl.col(\"过户费\"),\n",
    "    其他费=pl.col(\"其他费\"),\n",
    "    发生金额=pl.col(\"发生金额\"),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "d70789ae-d1ec-499c-8777-7a319b6a59f6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (53, 15)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>证券代码</th><th>证券名称</th><th>成交日期</th><th>成交时间</th><th>成交数量</th><th>成交价格</th><th>成交金额</th><th>发生金额</th><th>操作</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>备注</th><th>券商</th></tr><tr><td>str</td><td>str</td><td>date</td><td>time</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;600638&quot;</td><td>&quot;新黄浦&quot;</td><td>2023-07-26</td><td>09:33:56</td><td>9300.0</td><td>6.526</td><td>60696.0</td><td>60628.01</td><td>&quot;卖&quot;</td><td>6.68</td><td>60.7</td><td>0.61</td><td>0.0</td><td>&quot;新黄浦证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002492&quot;</td><td>&quot;恒基达鑫&quot;</td><td>2023-07-27</td><td>09:30:42</td><td>8700.0</td><td>6.12</td><td>53244.0</td><td>53184.91</td><td>&quot;卖&quot;</td><td>5.86</td><td>53.23</td><td>0.0</td><td>0.0</td><td>&quot;恒基达鑫证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002136&quot;</td><td>&quot;安 纳 达&quot;</td><td>2023-07-27</td><td>09:32:52</td><td>4400.0</td><td>11.881</td><td>52277.0</td><td>52218.97</td><td>&quot;卖&quot;</td><td>5.75</td><td>52.28</td><td>0.0</td><td>0.0</td><td>&quot;安 纳 达证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;603967&quot;</td><td>&quot;中创物流&quot;</td><td>2023-08-22</td><td>09:36:13</td><td>10600.0</td><td>9.36</td><td>99216.0</td><td>99104.85</td><td>&quot;卖&quot;</td><td>10.91</td><td>99.24</td><td>1.0</td><td>0.0</td><td>&quot;中创物流证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;603967&quot;</td><td>&quot;中创物流&quot;</td><td>2023-08-04</td><td>10:07:37</td><td>10600.0</td><td>9.43</td><td>99958.0</td><td>-99970.01</td><td>&quot;买&quot;</td><td>11.0</td><td>0.0</td><td>1.01</td><td>0.0</td><td>&quot;中创物流证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;300464&quot;</td><td>&quot;星徽股份&quot;</td><td>2023-10-18</td><td>09:46:15</td><td>16100.0</td><td>5.74</td><td>92414.0</td><td>92358.97</td><td>&quot;卖&quot;</td><td>8.82</td><td>46.21</td><td>0.0</td><td>0.0</td><td>&quot;星徽股份证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002661&quot;</td><td>&quot;克明食品&quot;</td><td>2023-10-18</td><td>09:55:41</td><td>8500.0</td><td>9.42</td><td>80072.0</td><td>-80079.64</td><td>&quot;买&quot;</td><td>7.64</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;克明食品证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;002753&quot;</td><td>&quot;永东股份&quot;</td><td>2023-10-09</td><td>09:48:02</td><td>14200.0</td><td>7.02</td><td>99684.0</td><td>-99693.51</td><td>&quot;买&quot;</td><td>9.51</td><td>0.0</td><td>0.0</td><td>0.0</td><td>&quot;永东股份证券买入&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;000698&quot;</td><td>&quot;沈阳化工&quot;</td><td>2023-10-09</td><td>09:45:18</td><td>23800.0</td><td>4.053</td><td>96460.0</td><td>96402.56</td><td>&quot;卖&quot;</td><td>9.2</td><td>48.24</td><td>0.0</td><td>0.0</td><td>&quot;沈阳化工证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr><tr><td>&quot;605288&quot;</td><td>&quot;凯迪股份&quot;</td><td>2023-10-09</td><td>09:44:40</td><td>2500.0</td><td>40.838</td><td>102094.0</td><td>102032.21</td><td>&quot;卖&quot;</td><td>9.74</td><td>51.05</td><td>1.0</td><td>0.0</td><td>&quot;凯迪股份证券卖出&quot;</td><td>&quot;海通两融&quot;</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (53, 15)\n",
       "┌──────────┬──────────┬──────────┬──────────┬───┬────────┬────────┬──────────┬─────────┐\n",
       "│ 证券代码 ┆ 证券名称 ┆ 成交日期 ┆ 成交时间 ┆ … ┆ 过户费 ┆ 其他费 ┆ 备注     ┆ 券商    │\n",
       "│ ---      ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---    ┆ ---      ┆ ---     │\n",
       "│ str      ┆ str      ┆ date     ┆ time     ┆   ┆ f64    ┆ f64    ┆ str      ┆ str     │\n",
       "╞══════════╪══════════╪══════════╪══════════╪═══╪════════╪════════╪══════════╪═════════╡\n",
       "│ 600638   ┆ 新黄浦   ┆ 2023-07- ┆ 09:33:56 ┆ … ┆ 0.61   ┆ 0.0    ┆ 新黄浦证 ┆ 海通两  │\n",
       "│          ┆          ┆ 26       ┆          ┆   ┆        ┆        ┆ 券卖出   ┆ 融      │\n",
       "│ 002492   ┆ 恒基达鑫 ┆ 2023-07- ┆ 09:30:42 ┆ … ┆ 0.0    ┆ 0.0    ┆ 恒基达鑫 ┆ 海通两  │\n",
       "│          ┆          ┆ 27       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 002136   ┆ 安 纳 达 ┆ 2023-07- ┆ 09:32:52 ┆ … ┆ 0.0    ┆ 0.0    ┆ 安 纳    ┆ 海通两  │\n",
       "│          ┆          ┆ 27       ┆          ┆   ┆        ┆        ┆ 达证券卖 ┆ 融      │\n",
       "│          ┆          ┆          ┆          ┆   ┆        ┆        ┆ 出       ┆         │\n",
       "│ 603967   ┆ 中创物流 ┆ 2023-08- ┆ 09:36:13 ┆ … ┆ 1.0    ┆ 0.0    ┆ 中创物流 ┆ 海通两  │\n",
       "│          ┆          ┆ 22       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 603967   ┆ 中创物流 ┆ 2023-08- ┆ 10:07:37 ┆ … ┆ 1.01   ┆ 0.0    ┆ 中创物流 ┆ 海通两  │\n",
       "│          ┆          ┆ 04       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "│ …        ┆ …        ┆ …        ┆ …        ┆ … ┆ …      ┆ …      ┆ …        ┆ …       │\n",
       "│ 300464   ┆ 星徽股份 ┆ 2023-10- ┆ 09:46:15 ┆ … ┆ 0.0    ┆ 0.0    ┆ 星徽股份 ┆ 海通两  │\n",
       "│          ┆          ┆ 18       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 002661   ┆ 克明食品 ┆ 2023-10- ┆ 09:55:41 ┆ … ┆ 0.0    ┆ 0.0    ┆ 克明食品 ┆ 海通两  │\n",
       "│          ┆          ┆ 18       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "│ 002753   ┆ 永东股份 ┆ 2023-10- ┆ 09:48:02 ┆ … ┆ 0.0    ┆ 0.0    ┆ 永东股份 ┆ 海通两  │\n",
       "│          ┆          ┆ 09       ┆          ┆   ┆        ┆        ┆ 证券买入 ┆ 融      │\n",
       "│ 000698   ┆ 沈阳化工 ┆ 2023-10- ┆ 09:45:18 ┆ … ┆ 0.0    ┆ 0.0    ┆ 沈阳化工 ┆ 海通两  │\n",
       "│          ┆          ┆ 09       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "│ 605288   ┆ 凯迪股份 ┆ 2023-10- ┆ 09:44:40 ┆ … ┆ 1.0    ┆ 0.0    ┆ 凯迪股份 ┆ 海通两  │\n",
       "│          ┆          ┆ 09       ┆          ┆   ┆        ┆        ┆ 证券卖出 ┆ 融      │\n",
       "└──────────┴──────────┴──────────┴──────────┴───┴────────┴────────┴──────────┴─────────┘"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "id": "9b4ce74c-c2cd-48fb-8c3d-269adf3eab15",
   "metadata": {},
   "outputs": [],
   "source": [
    "d3 = d3.select(\n",
    "    券商=pl.col(\"券商\"),\n",
    "    交易日期=pl.col(\"成交日期\"),\n",
    "    交易时间=pl.col(\"成交时间\"),\n",
    "    证券代码=pl.col(\"证券代码\"),\n",
    "    证券名称=pl.col(\"证券名称\"),\n",
    "    买卖标志=pl.col(\"操作\").replace({\"卖\": \"卖出\", \"买\": \"买入\"}),\n",
    "    成交价格=pl.col(\"成交价格\"),\n",
    "    成交数量=pl.col(\"成交数量\").abs(),\n",
    "    成交金额=pl.col(\"成交金额\"),\n",
    "    手续费=pl.col(\"手续费\"),\n",
    "    印花税=pl.col(\"印花税\"),\n",
    "    过户费=pl.col(\"过户费\"),\n",
    "    其他费=pl.col(\"其他费\"),\n",
    "    发生金额=pl.col(\"发生金额\"),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "id": "a0945d7f-028b-4740-8817-bf14b2760170",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pl.concat([d1, d2, d3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "id": "8b8ef0bc-7bf5-41ae-be41-5277e82a33ef",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (363, 17)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>券商</th><th>交易日期</th><th>交易时间</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>成交价格</th><th>成交数量</th><th>成交金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>发生金额</th><th>成交金额2</th><th>成交金额D</th><th>发生金额D</th></tr><tr><td>str</td><td>date</td><td>time</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:44:52</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>3.19</td><td>47000.0</td><td>149930.0</td><td>23.99</td><td>0.0</td><td>1.51</td><td>0.0</td><td>-149955.5</td><td>149930.0</td><td>0.0</td><td>0.0</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:44:31</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>12.6066</td><td>11900.0</td><td>150019.0</td><td>24.0</td><td>0.0</td><td>1.49</td><td>0.0</td><td>-150044.49</td><td>150018.54</td><td>0.46</td><td>0.0</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:43:38</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;买入&quot;</td><td>3.69</td><td>40700.0</td><td>150183.0</td><td>24.03</td><td>0.0</td><td>1.5</td><td>0.0</td><td>-150208.53</td><td>150183.0</td><td>0.0</td><td>0.0</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:42:51</td><td>&quot;600015&quot;</td><td>&quot;华夏银行&quot;</td><td>&quot;买入&quot;</td><td>5.07</td><td>30000.0</td><td>152100.0</td><td>24.34</td><td>0.0</td><td>1.52</td><td>0.0</td><td>-152125.86</td><td>152100.0</td><td>0.0</td><td>0.0</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:39:28</td><td>&quot;601992&quot;</td><td>&quot;金隅集团&quot;</td><td>&quot;卖出&quot;</td><td>2.5683</td><td>54000.0</td><td>138686.0</td><td>22.19</td><td>138.69</td><td>1.38</td><td>0.0</td><td>138523.74</td><td>138688.2</td><td>-2.2</td><td>0.0</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-10-24</td><td>09:37:27</td><td>&quot;300283&quot;</td><td>&quot;温州宏丰&quot;</td><td>&quot;买入&quot;</td><td>5.4038</td><td>12900.0</td><td>69709.0</td><td>11.15</td><td>0.0</td><td>0.83</td><td>0.0</td><td>-69720.15</td><td>69709.02</td><td>-0.02</td><td>0.83</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-10-11</td><td>09:32:03</td><td>&quot;000900&quot;</td><td>&quot;现代投资&quot;</td><td>&quot;卖出&quot;</td><td>3.8465</td><td>34400.0</td><td>132321.0</td><td>21.17</td><td>132.35</td><td>1.31</td><td>0.0</td><td>132167.48</td><td>132319.6</td><td>1.4</td><td>1.31</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:38:10</td><td>&quot;002462&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>13.2062</td><td>10400.0</td><td>137344.0</td><td>21.98</td><td>137.35</td><td>1.38</td><td>0.0</td><td>137184.67</td><td>137344.48</td><td>-0.48</td><td>1.38</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-11</td><td>09:33:37</td><td>&quot;000900&quot;</td><td>&quot;现代投资&quot;</td><td>&quot;买入&quot;</td><td>4.05</td><td>34400.0</td><td>139320.0</td><td>22.29</td><td>0.0</td><td>1.39</td><td>0.0</td><td>-139342.29</td><td>139320.0</td><td>0.0</td><td>1.39</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-11</td><td>09:38:16</td><td>&quot;002462&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;买入&quot;</td><td>13.51</td><td>10400.0</td><td>140504.0</td><td>22.48</td><td>0.0</td><td>1.41</td><td>0.0</td><td>-140526.48</td><td>140504.0</td><td>0.0</td><td>1.41</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (363, 17)\n",
       "┌──────┬──────────┬──────────┬──────────┬───┬──────────┬──────────┬──────────┬─────────┐\n",
       "│ 券商 ┆ 交易日期 ┆ 交易时间 ┆ 证券代码 ┆ … ┆ 发生金额 ┆ 成交金额 ┆ 成交金额 ┆ 发生金  │\n",
       "│ ---  ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---      ┆ 2        ┆ D        ┆ 额D     │\n",
       "│ str  ┆ date     ┆ time     ┆ str      ┆   ┆ f64      ┆ ---      ┆ ---      ┆ ---     │\n",
       "│      ┆          ┆          ┆          ┆   ┆          ┆ f64      ┆ f64      ┆ f64     │\n",
       "╞══════╪══════════╪══════════╪══════════╪═══╪══════════╪══════════╪══════════╪═════════╡\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:44:52 ┆ 600408   ┆ … ┆ -149955. ┆ 149930.0 ┆ 0.0      ┆ 0.0     │\n",
       "│      ┆ 18       ┆          ┆          ┆   ┆ 5        ┆          ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:44:31 ┆ 600648   ┆ … ┆ -150044. ┆ 150018.5 ┆ 0.46     ┆ 0.0     │\n",
       "│      ┆ 18       ┆          ┆          ┆   ┆ 49       ┆ 4        ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:43:38 ┆ 600269   ┆ … ┆ -150208. ┆ 150183.0 ┆ 0.0      ┆ 0.0     │\n",
       "│      ┆ 18       ┆          ┆          ┆   ┆ 53       ┆          ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:42:51 ┆ 600015   ┆ … ┆ -152125. ┆ 152100.0 ┆ 0.0      ┆ 0.0     │\n",
       "│      ┆ 18       ┆          ┆          ┆   ┆ 86       ┆          ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:39:28 ┆ 601992   ┆ … ┆ 138523.7 ┆ 138688.2 ┆ -2.2     ┆ 0.0     │\n",
       "│      ┆ 18       ┆          ┆          ┆   ┆ 4        ┆          ┆          ┆         │\n",
       "│ …    ┆ …        ┆ …        ┆ …        ┆ … ┆ …        ┆ …        ┆ …        ┆ …       │\n",
       "│ 湘财 ┆ 2022-10- ┆ 09:37:27 ┆ 300283   ┆ … ┆ -69720.1 ┆ 69709.02 ┆ -0.02    ┆ 0.83    │\n",
       "│      ┆ 24       ┆          ┆          ┆   ┆ 5        ┆          ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-10- ┆ 09:32:03 ┆ 000900   ┆ … ┆ 132167.4 ┆ 132319.6 ┆ 1.4      ┆ 1.31    │\n",
       "│      ┆ 11       ┆          ┆          ┆   ┆ 8        ┆          ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:38:10 ┆ 002462   ┆ … ┆ 137184.6 ┆ 137344.4 ┆ -0.48    ┆ 1.38    │\n",
       "│      ┆ 18       ┆          ┆          ┆   ┆ 7        ┆ 8        ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:33:37 ┆ 000900   ┆ … ┆ -139342. ┆ 139320.0 ┆ 0.0      ┆ 1.39    │\n",
       "│      ┆ 11       ┆          ┆          ┆   ┆ 29       ┆          ┆          ┆         │\n",
       "│ 湘财 ┆ 2022-07- ┆ 09:38:16 ┆ 002462   ┆ … ┆ -140526. ┆ 140504.0 ┆ 0.0      ┆ 1.41    │\n",
       "│      ┆ 11       ┆          ┆          ┆   ┆ 48       ┆          ┆          ┆         │\n",
       "└──────┴──────────┴──────────┴──────────┴───┴──────────┴──────────┴──────────┴─────────┘"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.with_columns(\n",
    "    成交金额2=pl.col(\"成交价格\") * pl.col(\"成交数量\"),\n",
    ").with_columns(\n",
    "    成交金额D=pl.col(\"成交金额\") - pl.col(\"成交金额2\"),\n",
    ").with_columns(\n",
    "    发生金额D=(\n",
    "        pl.col(\"发生金额\")\n",
    "        - (\n",
    "            pl.when(pl.col(\"买卖标志\") == \"买入\")\n",
    "            .then(-pl.col(\"成交金额\"))\n",
    "            .when(pl.col(\"买卖标志\") == \"卖出\")\n",
    "            .then(pl.col(\"成交金额\"))\n",
    "            - pl.col(\"手续费\")\n",
    "            - pl.col(\"印花税\")\n",
    "            - pl.col(\"过户费\")\n",
    "            - pl.col(\"其他费\")\n",
    "        )\n",
    "    ).round(4)\n",
    ").sort(\"发生金额D\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "id": "d3439551-e681-408e-b88d-821bcd91c155",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.write_parquet(\"stock_trades.parquet\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "id": "0e2092cb-8bb1-4a18-8a51-0808a96315eb",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.write_csv(\"stock_trades.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "id": "d280e5f9-87d9-46c8-b157-3633e5e697f3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<xlsxwriter.workbook.Workbook at 0x24adb971a60>"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.write_excel(\"stock_trades.xlsx\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "id": "b55b33f8-ae6d-4ccc-8111-025c7b6bfc41",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><style>\n",
       ".dataframe > thead > tr,\n",
       ".dataframe > tbody > tr {\n",
       "  text-align: right;\n",
       "  white-space: pre-wrap;\n",
       "}\n",
       "</style>\n",
       "<small>shape: (363, 14)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>券商</th><th>交易日期</th><th>交易时间</th><th>证券代码</th><th>证券名称</th><th>买卖标志</th><th>成交价格</th><th>成交数量</th><th>成交金额</th><th>手续费</th><th>印花税</th><th>过户费</th><th>其他费</th><th>发生金额</th></tr><tr><td>str</td><td>date</td><td>time</td><td>str</td><td>str</td><td>str</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:38:10</td><td>&quot;002462&quot;</td><td>&quot;嘉事堂&quot;</td><td>&quot;卖出&quot;</td><td>13.2062</td><td>10400.0</td><td>137344.0</td><td>21.98</td><td>137.35</td><td>1.38</td><td>0.0</td><td>137184.67</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:44:52</td><td>&quot;600408&quot;</td><td>&quot;安泰集团&quot;</td><td>&quot;买入&quot;</td><td>3.19</td><td>47000.0</td><td>149930.0</td><td>23.99</td><td>0.0</td><td>1.51</td><td>0.0</td><td>-149955.5</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:44:31</td><td>&quot;600648&quot;</td><td>&quot;外高桥&quot;</td><td>&quot;买入&quot;</td><td>12.6066</td><td>11900.0</td><td>150019.0</td><td>24.0</td><td>0.0</td><td>1.49</td><td>0.0</td><td>-150044.49</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:43:38</td><td>&quot;600269&quot;</td><td>&quot;赣粤高速&quot;</td><td>&quot;买入&quot;</td><td>3.69</td><td>40700.0</td><td>150183.0</td><td>24.03</td><td>0.0</td><td>1.5</td><td>0.0</td><td>-150208.53</td></tr><tr><td>&quot;湘财&quot;</td><td>2022-07-18</td><td>09:42:51</td><td>&quot;600015&quot;</td><td>&quot;华夏银行&quot;</td><td>&quot;买入&quot;</td><td>5.07</td><td>30000.0</td><td>152100.0</td><td>24.34</td><td>0.0</td><td>1.52</td><td>0.0</td><td>-152125.86</td></tr><tr><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td><td>&hellip;</td></tr><tr><td>&quot;海通两融&quot;</td><td>2023-10-18</td><td>09:46:15</td><td>&quot;300464&quot;</td><td>&quot;星徽股份&quot;</td><td>&quot;卖出&quot;</td><td>5.74</td><td>16100.0</td><td>92414.0</td><td>8.82</td><td>46.21</td><td>0.0</td><td>0.0</td><td>92358.97</td></tr><tr><td>&quot;海通两融&quot;</td><td>2023-10-18</td><td>09:55:41</td><td>&quot;002661&quot;</td><td>&quot;克明食品&quot;</td><td>&quot;买入&quot;</td><td>9.42</td><td>8500.0</td><td>80072.0</td><td>7.64</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-80079.64</td></tr><tr><td>&quot;海通两融&quot;</td><td>2023-10-09</td><td>09:48:02</td><td>&quot;002753&quot;</td><td>&quot;永东股份&quot;</td><td>&quot;买入&quot;</td><td>7.02</td><td>14200.0</td><td>99684.0</td><td>9.51</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-99693.51</td></tr><tr><td>&quot;海通两融&quot;</td><td>2023-10-09</td><td>09:45:18</td><td>&quot;000698&quot;</td><td>&quot;沈阳化工&quot;</td><td>&quot;卖出&quot;</td><td>4.053</td><td>23800.0</td><td>96460.0</td><td>9.2</td><td>48.24</td><td>0.0</td><td>0.0</td><td>96402.56</td></tr><tr><td>&quot;海通两融&quot;</td><td>2023-10-09</td><td>09:44:40</td><td>&quot;605288&quot;</td><td>&quot;凯迪股份&quot;</td><td>&quot;卖出&quot;</td><td>40.838</td><td>2500.0</td><td>102094.0</td><td>9.74</td><td>51.05</td><td>1.0</td><td>0.0</td><td>102032.21</td></tr></tbody></table></div>"
      ],
      "text/plain": [
       "shape: (363, 14)\n",
       "┌──────────┬───────────┬──────────┬──────────┬───┬────────┬────────┬────────┬──────────┐\n",
       "│ 券商     ┆ 交易日期  ┆ 交易时间 ┆ 证券代码 ┆ … ┆ 印花税 ┆ 过户费 ┆ 其他费 ┆ 发生金额 │\n",
       "│ ---      ┆ ---       ┆ ---      ┆ ---      ┆   ┆ ---    ┆ ---    ┆ ---    ┆ ---      │\n",
       "│ str      ┆ date      ┆ time     ┆ str      ┆   ┆ f64    ┆ f64    ┆ f64    ┆ f64      │\n",
       "╞══════════╪═══════════╪══════════╪══════════╪═══╪════════╪════════╪════════╪══════════╡\n",
       "│ 湘财     ┆ 2022-07-1 ┆ 09:38:10 ┆ 002462   ┆ … ┆ 137.35 ┆ 1.38   ┆ 0.0    ┆ 137184.6 │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 7        │\n",
       "│ 湘财     ┆ 2022-07-1 ┆ 09:44:52 ┆ 600408   ┆ … ┆ 0.0    ┆ 1.51   ┆ 0.0    ┆ -149955. │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 5        │\n",
       "│ 湘财     ┆ 2022-07-1 ┆ 09:44:31 ┆ 600648   ┆ … ┆ 0.0    ┆ 1.49   ┆ 0.0    ┆ -150044. │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 49       │\n",
       "│ 湘财     ┆ 2022-07-1 ┆ 09:43:38 ┆ 600269   ┆ … ┆ 0.0    ┆ 1.5    ┆ 0.0    ┆ -150208. │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 53       │\n",
       "│ 湘财     ┆ 2022-07-1 ┆ 09:42:51 ┆ 600015   ┆ … ┆ 0.0    ┆ 1.52   ┆ 0.0    ┆ -152125. │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 86       │\n",
       "│ …        ┆ …         ┆ …        ┆ …        ┆ … ┆ …      ┆ …      ┆ …      ┆ …        │\n",
       "│ 海通两融 ┆ 2023-10-1 ┆ 09:46:15 ┆ 300464   ┆ … ┆ 46.21  ┆ 0.0    ┆ 0.0    ┆ 92358.97 │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆          │\n",
       "│ 海通两融 ┆ 2023-10-1 ┆ 09:55:41 ┆ 002661   ┆ … ┆ 0.0    ┆ 0.0    ┆ 0.0    ┆ -80079.6 │\n",
       "│          ┆ 8         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 4        │\n",
       "│ 海通两融 ┆ 2023-10-0 ┆ 09:48:02 ┆ 002753   ┆ … ┆ 0.0    ┆ 0.0    ┆ 0.0    ┆ -99693.5 │\n",
       "│          ┆ 9         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 1        │\n",
       "│ 海通两融 ┆ 2023-10-0 ┆ 09:45:18 ┆ 000698   ┆ … ┆ 48.24  ┆ 0.0    ┆ 0.0    ┆ 96402.56 │\n",
       "│          ┆ 9         ┆          ┆          ┆   ┆        ┆        ┆        ┆          │\n",
       "│ 海通两融 ┆ 2023-10-0 ┆ 09:44:40 ┆ 605288   ┆ … ┆ 51.05  ┆ 1.0    ┆ 0.0    ┆ 102032.2 │\n",
       "│          ┆ 9         ┆          ┆          ┆   ┆        ┆        ┆        ┆ 1        │\n",
       "└──────────┴───────────┴──────────┴──────────┴───┴────────┴────────┴────────┴──────────┘"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pl.read_parquet(\"stock_trades.parquet\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d74861bc-1475-4397-ac4f-cd4df03f8234",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
